2019-04-30 14:39:24 +00:00
|
|
|
<header class="header">
|
2019-05-12 22:55:58 +00:00
|
|
|
<a href="{{ .Site.BaseURL }}" class="header-logo">
|
|
|
|
<img src="/static/img/logo-arbejdsfaellesskabet.svg">
|
2019-04-30 14:39:24 +00:00
|
|
|
</a>
|
|
|
|
|
|
|
|
<nav>
|
|
|
|
<ul>
|
|
|
|
{{ $currentPage := . }}
|
|
|
|
{{ range .Site.Menus.main }}
|
|
|
|
<li class="{{ if (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .))}}active{{ end }}">
|
|
|
|
<a href="{{ .URL | absURL }}">{{ .Name }}</a>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
{{ range .Site.Menus.main }}
|
|
|
|
{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}
|
|
|
|
<ul class="header-submenu">
|
|
|
|
{{ if and ($currentPage.IsMenuCurrent "main" .) (.HasChildren) }}
|
|
|
|
<li class="active">
|
|
|
|
<a href="{{ .URL | absURL }}">{{ .Name }}</a>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
{{ if and ($currentPage.HasMenuCurrent "main" .) (not (eq $currentPage.Name .Name)) }}
|
|
|
|
<li>
|
|
|
|
<a href="{{ .URL | absURL }}">{{ .Name }}</a>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
{{ if .HasChildren }}
|
|
|
|
{{ range .Children }}
|
|
|
|
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
|
|
|
|
<a href="{{ .URL | absURL }}">{{ .Name }}</a>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|