7
0
Fork 0
This repository has been archived on 2024-10-15. You can view files and clone it, but cannot push or open issues or pull requests.
fediversity_website_archive/themes/nluug/layouts/partials/header.html

40 lines
1.7 KiB
HTML
Raw Normal View History

{{ $.Scratch.Set "counter" 0 }}
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
<header>
<div class="header-content">
{{ $logoresource := resources.Get (.Site.Params.logoNormal | replaceRE "^/" "") }}
<a href="/" class="logo" title="Terug naar hoofdpagina"><img src="{{ $logoresource | relURL }}" alt="NLUUG-logo" width="{{ $logoresource.Width }}" height="{{ $logoresource.Height }}"></a>
<input type="checkbox" id="hamburger" aria-label="menu button">
<label for="hamburger"><span></span></label>
<nav aria-label="Main navigation">
<ul class="menus menu">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
{{ if .Children }}
<li>
<button type="button" aria-haspopup="true" aria-expanded="true" aria-controls="dropdown-{{ $.Scratch.Get "counter" }}">
<a href="{{ .URL }}">{{ .Name }}</a>
</button>
<ul class="dropdown" id="dropdown-{{ $.Scratch.Get "counter" }}">
{{ range .Children }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</li>
{{ else }}
<li><button type="button" aria-haspopup="true" aria-expanded="true"><a href="{{ .URL }}">{{ .Name }}</a></button></li>
{{ end }}
{{ end }}
<li><button type="button" aria-haspopup="false" aria-expanded="true"><a href="{{ relLangURL "/zoeken/"}}">{{ partial "show-svg-icon.html" (dict "context" . "icon" "magnifying-glass" "class" "shownormal") }}</a></button></li>
</ul>
</nav>
</div>
</header>