Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
University of Michigan Fencing
club-theme
Commits
5eb17541
Commit
5eb17541
authored
Jan 12, 2017
by
IKEDA Kiyoshi
Committed by
GitHub
Jan 12, 2017
Browse files
Merge pull request #21 from key-amb/maint
Fix #20 / Use .IsHome and change way to detect active menu link
parents
ae1f1c20
c0045dec
Changes
2
Hide whitespace changes
Inline
Side-by-side
layouts/partials/header.html
View file @
5eb17541
<!DOCTYPE html>
{{ $baseUrl := .Site.BaseURL }}
{{ $isHomePage := eq .Title .Site.Title }}
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"alternate"
href=
"/index.xml"
type=
"application/rss+xml"
title=
"{{ .Site.Title }}"
>
<link
rel=
"icon"
href=
"{{ $baseUrl }}/favicon.ico"
>
<title>
{{
.Title }}{{ if eq $isHomePage fals
e }} - {{ .Site.Title
}}{{ end
}}
</title>
<title>
{{
if not .IsHome }}{{ .Titl
e }} - {{
end }}{{
.Site.Title }}
</title>
<!--<link href="http://fonts.googleapis.com/css?family=PT+Sans:400,700" rel="stylesheet" type="text/css">-->
<link
rel=
"stylesheet"
href=
"{{ $baseUrl }}/css/highlight/{{ with .Site.Params.highlightStyle }}{{ . }}{{ else }}default{{ end }}.css"
>
<link
rel=
"stylesheet"
href=
"{{ $baseUrl }}/css/bootstrap.min.css"
>
...
...
@@ -32,11 +31,11 @@
</div>
<div
id=
"navbar"
class=
"navbar-collapse collapse"
>
<ul
class=
"nav navbar-nav"
>
<li
{{
if
eq
$
isHomePage
tru
e
}}
class=
"active"
{{
end
}}
><a
href=
"{{ $baseUrl }}/"
>
Home
</a></li>
<li
{{
if
.
IsHom
e
}}
class=
"active"
{{
end
}}
><a
href=
"{{ $baseUrl }}/"
>
Home
</a></li>
{{ $url := .Permalink }}
{{ with .Site.Params.mainMenu }}
{{ range $menu := . }}
{{ $itemUrl := printf "%s/%s
/
" $baseUrl $menu.link }}
{{ $itemUrl := printf "%s/%s" $baseUrl $menu.link }}
<li
{{
if
eq
$
url
$
itemUrl
}}
class=
"active"
{{
end
}}
><a
href=
"{{ $baseUrl }}/{{ $menu.link }}"
>
{{ $menu.name }}
</a></li>
{{ end }}
{{ end }}
...
...
theme.toml
View file @
5eb17541
...
...
@@ -5,7 +5,7 @@ description = "A simple Hugo theme with Bootstrap for documentation"
homepage
=
"http://key-amb.github.io/bootie-docs-demo/"
tags
=
[
"document"
,
"bootstrap"
]
features
=
[
"document"
,
""
]
min_version
=
0.1
4
min_version
=
0.1
5
[author]
name
=
"IKEDA Kiyoshi"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment