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
5b14e408
Commit
5b14e408
authored
Mar 05, 2017
by
key-amb
Browse files
Change / Switch to Hugo's built-in Menu System.
See
https://github.com/key-amb/hugo-theme-bootie-docs/issues/23
parent
1137a65b
Changes
1
Hide whitespace changes
Inline
Side-by-side
layouts/partials/header.html
View file @
5b14e408
...
...
@@ -32,11 +32,10 @@
<div
id=
"navbar"
class=
"navbar-collapse collapse"
>
<ul
class=
"nav navbar-nav"
>
<li
{{
if
.
IsHome
}}
class=
"active"
{{
end
}}
><a
href=
"{{ $baseUrl }}/"
>
Home
</a></li>
{{ $url := .
Permalink
}}
{{ with .Site.
Param
s.main
Menu
}}
{{ $url := .
URL
}}
{{ with .Site.
Menu
s.main }}
{{ range $menu := . }}
{{ $itemUrl := printf "%s/%s" $baseUrl $menu.link }}
<li
{{
if
eq
$
url
$
itemUrl
}}
class=
"active"
{{
end
}}
><a
href=
"{{ $baseUrl }}/{{ $menu.link }}"
>
{{ $menu.name }}
</a></li>
<li
{{
if
eq
$
url
.
URL
}}
class=
"active"
{{
end
}}
><a
href=
"{{ .URL }}"
>
{{ .Name }}
</a></li>
{{ end }}
{{ end }}
{{ if not .Site.Params.noCategoryLink }}
...
...
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