mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-10-01 01:06:14 -04:00
Fix menu
This commit is contained in:
parent
1bc35a3e33
commit
8539fd9440
@ -44,19 +44,20 @@
|
||||
{{ else }}
|
||||
<p class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></p>
|
||||
{{ end }}
|
||||
{{ if (isset .Site.Menus "main") }}
|
||||
{{ if .Site.Menus.main }}
|
||||
<button class="menu-toggle" type="button"></button>
|
||||
{{ end }}
|
||||
</div>
|
||||
</header>
|
||||
{{ if .Site.Menus.main }}
|
||||
<nav class="nav">
|
||||
<ul class="menu">
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
<li class="{{ if $currentPage.IsMenuCurrent `main` . }}active{{ end }}">
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<ul class="menu">
|
||||
{{ range .Site.Menus.main }}
|
||||
<li>
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{ end }}
|
||||
<main class="main">
|
||||
|
Loading…
Reference in New Issue
Block a user