Next/Prev stuff

This commit is contained in:
Simon Martens
2025-03-30 18:12:52 +02:00
parent 316e8e3f58
commit 0e2c6360bf
25 changed files with 355 additions and 67 deletions

View File

@@ -0,0 +1,49 @@
{{ $model := . }}
<nav>
{{- range $y := .years -}}
<a
class="inline-block stdlink px-0.5"
href="/jahrgang/{{ $y }}"
{{ if eq $model.year $y -}}aria-current="page"{{- end }}
>{{ $y }}</a
>
{{- end -}}
<a
class="inline-block stdlink px-0.5"
href="/jahrgang/all"
{{ if .all -}}aria-current="page"{{- end }}
>Alle</a
>
</nav>
{{- if .years -}}
{{- if .year -}}
{{- $letters := index $model.yearmap $model.year -}}
<div class="flex flex-row gap-x-1">
<div>{{- .year }}</div>
<div>({{- len $letters }})</div>
</div>
{{ range $l := $letters -}}
<a href="/brief/{{ $l.Letter }}" class="">
{{- template "_letterhead" $l -}}
</a>
{{- end -}}
{{- end -}}
{{- if .all -}}
{{- range $y := .years -}}
<div>
{{- $y -}}
{{- $letters := index $model.yearmap $y -}}
{{- len $letters }}
{{ range $l := $letters -}}
<a href="/brief/{{ $l.Letter }}" class="">
{{- template "_letterhead" $l -}}
</a>
{{- end -}}
</div>
{{- end -}}
{{- end -}}
{{- end -}}