public-web/layouts/partials/header.html
2024-07-16 03:19:06 +02:00

40 lines
1.4 KiB
HTML

<header class="py-4 container mx-auto px-6">
<div class="flex items-center lg:mb-4 gap-6">
<a href="{{ "/" | relLangURL }}" title="Home" rel="home" class="mr-auto block w-40">
<h1 class="sr-only">{{ site.Title }}</h1>
{{ partial "logo.html" }}
</a>
<div class="flex items-center gap-2">
<span class="max-lg:hidden">{{ partial "language-selector.html" . }}</span>
{{ partial "theme-selector.html" . }}
<button class="button button--icon lg:hidden" x-on:click="menuOpen = true">
<span class="sr-only">{{ i18n "menu_label" }}</span>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-6">
<path fill="none" d="M0 0h24v24H0z"/>
<path fill="currentColor" d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/>
</svg>
</button>
</div>
</div>
<nav>
<ul class="hidden lg:flex flex-wrap gap-x-6">
{{ range site.Menus.main }}
{{ $isActive := false }} {{/* TODO fix */}}
<li>
<a
href="{{ .URL | relLangURL }}"
class="font-bold link {{ if $isActive }}link--active{{ end }}"
{{ if $isActive }}
aria-current="page"
{{ end }}
{{ with .Params.target }}
target="{{ . }}"
{{ end }}
>{{ .Name }}</a>
</li>
{{ end }}
</ul>
</nav>
</header>
{{ partial "menu.html" . }}