Some changes, path specific data

This commit is contained in:
Simon Martens
2025-02-18 18:39:30 +01:00
parent 0f32f38b5e
commit 3be64bd10d
19 changed files with 237 additions and 147 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
<div class="mt-12">Datenschutz, Impressum.</div>
<div class="mt-12 pt-3 border-t">Datenschutz, Impressum.</div>

View File

@@ -1,3 +1,4 @@
{{ $model := . }}
<div
class="pb-1.5 border-b border-zinc-300"
x-data="{ openeditionmenu: window.location.pathname.startsWith('/edition/')}">
@@ -8,15 +9,37 @@
</div>
<nav
class="self-end font-serif font-bold flex flex-row gap-x-6 [&>a]:no-underline
class="self-end font-serif font-bold flex flex-row gap-x-4 [&>a]:no-underline
[&>*]:px-1.5 [&>*]:pt-1 [&>*]:-mb-1.5">
<a href="/reihen/">Reihen</a>
<a href="/personen/">Personen</a>
<a href="/suche/">Suche</a>
<a
href="/reihen/"
{{ if and $model.page (HasPrefix $model.page.Path "/reihe") -}}
aria-current="page"
{{- end -}}
>Reihen</a
>
<a
href="/personen/"
{{ if and $model.page (HasPrefix $model.page.Path "/person") -}}
aria-current="page"
{{- end -}}
>Personen</a
>
<a
href="/suche/"
{{ if and $model.page (HasPrefix $model.page.Path "/suche") -}}
aria-current="page"
{{- end -}}
>Suche</a
>
<button
{{ if and $model.page (HasPrefix $model.page.Path "/edition") -}}
aria-current="true"
{{- end -}}
data-url="/edition/"
class="text-slate-600 hover:text-slate-900 hover:cursor-pointer"
:class="openeditionmenu? 'bg-slate-200' : 'closed'"
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>
@@ -27,17 +50,46 @@
<nav
:class="openeditionmenu? 'open' : 'closed'"
x-show="openeditionmenu"
class="submenu w-full flex flex-row justify-end pt-3 gap-x-6 font-bold font-serif
[&>a]:no-underline [&>*]:-mb-1.5">
<a href="/edition/einfuehrung/">Einführung</a>
<a href="/edition/dokumentation/">Dokumentation</a>
<a href="/edition/literatur/">Literatur</a>
<a href="/edition/danksagungen/">Danksagungen</a>
<a href="/edition/kontakt/">Kontakt</a>
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="/edition/einfuehrung/"
{{ if and $model.page (HasPrefix $model.page.Path "/edition/einfuehrung") -}}
aria-current="page"
{{- end -}}
>Einführung</a
>
<a
href="/edition/dokumentation/"
{{ if and $model.page (HasPrefix $model.page.Path "/edition/dokumentation") -}}
aria-current="page"
{{- end -}}
>Dokumentation</a
>
<a
href="/edition/literatur/"
{{ if and $model.page (HasPrefix $model.page.Path "/edition/literatur") -}}
aria-current="page"
{{- end -}}
>Literatur</a
>
<a
href="/edition/danksagungen/"
{{ if and $model.page (HasPrefix $model.page.Path "/edition/danksagungen") -}}
aria-current="page"
{{- end -}}
>Danksagungen</a
>
<a
href="/edition/kontakt/"
{{ if and $model.page (HasPrefix $model.page.Path "/edition/kontakt") -}}
aria-current="page"
{{- end -}}
>Kontakt</a
>
</nav>
</div>
<script type="module">
import { setMenuActive } from "/assets/scripts.js";
setMenuActive();
</script>

View File

@@ -30,8 +30,8 @@
</head>
<body class="w-full" hx-ext="response-targets" hx-boost="true">
<div class="container flex flex-col min-h-screen max-w-(--breakpoint-xl) mx-auto">
<header class="px-3 py-2.5" id="header">
<div class="container flex flex-col min-h-screen max-w-(--breakpoint-xl) mx-auto px-3 py-3.5">
<header class="" id="header">
{{ block "_menu" . }}
<!-- Default app menu... -->
{{ end }}
@@ -39,7 +39,7 @@
<div></div>
<main class="">
<main class="text-lg">
{{ block "body" . }}
<!-- Default app body... -->
{{ end }}

View File

@@ -0,0 +1,13 @@
{{ $model := . }}
{{ if $model.letters }}
<div class="alphabet">
{{ range $id, $r := .letters }}
<a
href="?letter={{ $r }}"
{{ if eq $model.active $r }}aria-current="page"{{ end }}
>{{ $r }}</a
>
{{ end }}
</div>
{{ end }}

View File

@@ -0,0 +1,4 @@
<h1>Die Seite konnte nicht gefunden werden!</h1>
{{ if .Error }}
<p>{{ .Error }}</p>
{{ end }}

View File

@@ -1,10 +1,6 @@
{{ $model := . }}
{{ range $count, $letter := $model.letters }}
<a href="/personen?letter={{ $letter }}{{ if $model.filter }}&filter={{ $model.filter }}{{ end }}"
>{{ $letter }}</a
>
{{ end }}
{{ template "_alphabet" Dict "active" .letter "letters" .letters }}
<input

View File

@@ -1,12 +1,6 @@
{{ $model := . }}
{{ if .letters }}
<div>
{{ range $id, $r := .letters }}
<a href="/reihen?letter={{ $r }}">{{ $r }}</a>
{{ end }}
</div>
{{ end }}
{{ template "_alphabet" Dict "active" .letter "letters" .letters }}
<input

View File

@@ -27,12 +27,9 @@
font-variant-caps: small-caps;
}
@layer base {
}
@layer components {
html {
font-size: 15.5px;
font-size: 16.5px;
}
body {
@@ -58,8 +55,16 @@
@apply ml-14 list-disc;
}
nav > a {
@apply hover:!border-zinc-200;
}
nav > * {
@apply border-b-4 border-transparent hover:!border-zinc-200;
@apply border-b-4 border-transparent;
}
nav > button[aria-current="true"] {
@apply !bg-slate-200;
}
nav a[aria-current="page"] {