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