lestoitsduval/layouts/partials/nav.html

21 lines
768 B
HTML
Raw Permalink Normal View History

2020-05-22 11:13:09 +02:00
<div class="nav">
<input type="checkbox" id="menu_checkbox" onchange="toggleCheckbox(this)">
<label for="menu_checkbox" class="icon-menu">
<div class="icon"></div>
</label>
<nav class="container">
{{ $title := .Title }}
{{ $section := .CurrentSection.Title }}
{{ $pages := where site.RegularPages "Type" "in" "page" }}
{{ $pages := $pages | intersect (where site.RegularPages "Params.headless" "!=" true) }}
{{ $pages := $pages | union (where site.Pages "Kind" "in" "section") }}
<ul class="grid -center">
{{ range $pages.ByWeight }}
<li class="{{ if or (eq .Title $title) (eq .Title $section) }}active{{ end }}">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</nav>
</div>