15 lines
798 B
HTML
15 lines
798 B
HTML
{{ $currentSection := .Section -}}
|
|
{{ $currentID := "" -}}
|
|
{{ with .File }}{{ $currentID = .UniqueID }}{{ end -}}
|
|
<nav class="main-menu layout__navigation">
|
|
<h2 class="visually-hidden">{{ i18n "menu_title" }}</h2>
|
|
<ul class="navbar">
|
|
{{ with .Site.Home }}<li><a class="{{ if eq $currentID .File.UniqueID }}active" aria-current="page{{ end }}" href="{{ .RelPermalink }}">{{ i18n "menu_home" }}</a></li>{{ end }}
|
|
{{ range where .Site.RegularPages "Section" "" -}}
|
|
<li><a class="{{ if eq $currentID .File.UniqueID }}active" aria-current="page{{ end }}" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
|
{{ end -}}
|
|
{{ range .Site.Sections -}}
|
|
<li><a class="{{ if eq $currentSection .Section }}active" aria-current="page{{ end }}" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
|
{{ end -}}
|
|
</ul>
|
|
</nav>
|