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

35 lines
1.3 KiB
HTML

{{ $.Scratch.Set "counter" 0 }}
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
<header>
<div class="header-content">
<a href="/" class="logo"><img src="/afbeeldingen/logo/nluug-logo.png" alt="NLUUG-logo" title="{{ .Site.Title }}"></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 }}
{{ if .Children }}
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
<li>
<button type="button" aria-haspopup="true" aria-expanded="true" aria-controls="dropdown{{ $.Scratch.Get "counter" }}">{{ .Name }}<span class="arrow"></span></button>
<ul class="dropdown" id="dropdown{{ $.Scratch.Get "counter" }}">
{{ range .Children }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</li>
{{ else }}
<li class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
{{ end }}
</ul>
</nav>
</div>
</header>