Files
musenalm/views/layouts/components/_menu.gohtml
Simon Martens f641a32cb5 request type
2025-05-23 09:55:23 +02:00

109 lines
3.1 KiB
Plaintext

{{ $model := . }}
<div
id="mainmenu"
class="pb-1.5 border-b border-zinc-300"
x-data="{ openeditionmenu: window.location.pathname.startsWith('/redaktion/')}">
<div class="flex flex-row justify-between">
<div class="flex flex-row gap-x-3">
<div class="grow-0">
<a href="/" class="no-underline"
><img class="h-14 w-14 border" src="/assets/favicon.png"
/></a>
</div>
<div class="flex flex-col">
<h1 class="font-bold text-2xl tracking-wide">
<a href="/" class="no-underline text-slate-800">{{ .site.title }}</a>
</h1>
<h2 class="italic text-slate-800">{{ .site.desc }}</h2>
</div>
</div>
<nav
class="self-end font-serif font-bold flex flex-row gap-x-4 [&>a]:no-underline
[&>*]:px-2 [&>*]:pt-1 [&>*]:-mb-1.5">
<a
href="/reihen/"
{{ if and $model.request (HasPrefix $model.request.path "/reihe") -}}
aria-current="page"
{{- end -}}
>Reihen</a
>
<a
href="/personen/"
{{ if and $model.request (HasPrefix $model.request.path "/person") -}}
aria-current="page"
{{- end -}}
>Personen</a
>
<a
href="/suche/"
{{ if and $model.request (HasPrefix $model.request.path "/suche") -}}
aria-current="page"
{{- end -}}
>Suche</a
>
<button
{{ if and $model.request (HasPrefix $model.request.path "/redaktion") -}}
aria-current="true"
{{- end }}
data-url="/redaktion/"
class="text-slate-600 hover:text-slate-900 hover:cursor-pointer hover:bg-slate-100
!pr-2.5"
:class="openeditionmenu? 'bg-slate-100' : 'closed'"
@click="openeditionmenu = !openeditionmenu">
<i x-show="!openeditionmenu" class="ri-arrow-right-s-fill"></i>
<i x-show="openeditionmenu" class="ri-arrow-down-s-fill"></i>
Redaktion &amp; Kontakt
</button>
</nav>
</div>
<nav
:class="openeditionmenu? 'open' : 'closed'"
x-show="openeditionmenu"
class="submenu flex flex-row justify-end pt-3.5 gap-x-4 font-bold font-serif
[&>a]:no-underline [&>*]:-mb-1.5 w-full pr-2.5 [&>*]:px-1.5">
<a
href="/redaktion/einleitung/"
{{ if and $model.request (HasPrefix $model.request.path "/redaktion/einleitung") -}}
aria-current="page"
{{- end -}}
>Einleitung</a
>
<a
href="/redaktion/benutzerhinweise/"
{{ if and $model.request (HasPrefix $model.request.path "/redaktion/benutzerhinweise") -}}
aria-current="page"
{{- end -}}
>Benutzerhinweise</a
>
<a
href="/redaktion/literatur/"
{{ if and $model.request (HasPrefix $model.request.path "/redaktion/literatur") -}}
aria-current="page"
{{- end -}}
>Literatur</a
>
<a
href="/redaktion/lesekabinett/"
{{ if and $model.request (HasPrefix $model.request.path "/redaktion/lesekabinett") -}}
aria-current="page"
{{- end -}}
>Lesekabinett</a
>
<a
href="/redaktion/danksagungen/"
{{ if and $model.request (HasPrefix $model.request.path "/redaktion/danksagungen") -}}
aria-current="page"
{{- end -}}
>Danksagungen</a
>
<a
href="/redaktion/kontakt/"
{{ if and $model.request (HasPrefix $model.request.path "/redaktion/kontakt") -}}
aria-current="page"
{{- end -}}
>Kontakt</a
>
</nav>
</div>