mirror of
https://github.com/Theodor-Springmann-Stiftung/lenz-web.git
synced 2025-10-29 09:15:33 +00:00
Grupperiung seiten
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,41 +1,45 @@
|
||||
{{ $model := . }}
|
||||
|
||||
|
||||
<nav class="print:hidden">
|
||||
{{- range $y := .years -}}
|
||||
<a
|
||||
class="inline-block stdlink px-0.5"
|
||||
href="/briefe?year={{ $y }}"
|
||||
{{ if eq $model.year $y -}}aria-current="page"{{- end }}
|
||||
>{{ $y }}</a
|
||||
>
|
||||
{{- range $i, $range := .ranges -}}
|
||||
{{- if $range.Letters -}}
|
||||
<a
|
||||
class="inline-block stdlink px-0.5"
|
||||
href="/briefe?range={{ $range.Label }}"
|
||||
{{ if eq $model.selectedRange $i -}}aria-current="page"{{- end }}
|
||||
>{{ $range.Label }}</a
|
||||
>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<a
|
||||
class="inline-block stdlink px-0.5"
|
||||
href="/briefe?year=all"
|
||||
href="/briefe?range=all"
|
||||
{{ if .all -}}aria-current="page"{{- end }}
|
||||
>Alle</a
|
||||
>
|
||||
</nav>
|
||||
|
||||
{{- if .years -}}
|
||||
{{- if .year -}}
|
||||
{{- $letters := index $model.yearmap $model.year -}}
|
||||
{{- if .ranges -}}
|
||||
{{- if ne .selectedRange -1 -}}
|
||||
{{- $selectedRangeData := index .ranges .selectedRange -}}
|
||||
<div class="flex flex-row gap-x-1">
|
||||
<div>Briefe für das Jahr {{- .year }}</div>
|
||||
<div>({{- len $letters }})</div>
|
||||
<div>Briefe für {{ $selectedRangeData.Label }}</div>
|
||||
<div>({{ len $selectedRangeData.Letters }})</div>
|
||||
</div>
|
||||
{{ template "_letterlist" $letters -}}
|
||||
{{ template "_letterlist" $selectedRangeData.Letters -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if .all -}}
|
||||
{{- range $y := .years -}}
|
||||
<div class="">
|
||||
{{- $y -}}
|
||||
{{- $letters := index $model.yearmap $y -}}
|
||||
<div>({{- len $letters }})</div>
|
||||
{{ template "_letterlist" $letters -}}
|
||||
</div>
|
||||
{{- range $range := .ranges -}}
|
||||
{{- if $range.Letters -}}
|
||||
<div class="mb-8">
|
||||
<div class="flex flex-row gap-x-1 mb-4">
|
||||
<div class="font-semibold">{{ $range.Label }}</div>
|
||||
<div>({{ len $range.Letters }})</div>
|
||||
</div>
|
||||
{{ template "_letterlist" $range.Letters -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
20
views/routes/index/body.gohtml
Normal file
20
views/routes/index/body.gohtml
Normal file
@@ -0,0 +1,20 @@
|
||||
{{ $model := . }}
|
||||
|
||||
<div class="space-y-8">
|
||||
<div class="prose max-w-none">
|
||||
<h1>Lenz-Briefe</h1>
|
||||
<p>Digitale Edition der Briefe von Jakob Michael Reinhold Lenz</p>
|
||||
</div>
|
||||
|
||||
<div class="space-y-6">
|
||||
{{- range $range := .ranges -}}
|
||||
{{- if $range.Letters -}}
|
||||
<div class="border-l-4 border-gray-300 pl-4">
|
||||
<h2 class="text-xl font-semibold mb-3">{{ $range.Label }}</h2>
|
||||
<div class="text-sm text-gray-600 mb-3">({{ len $range.Letters }} {{ if eq (len $range.Letters) 1 }}Brief{{ else }}Briefe{{ end }})</div>
|
||||
{{ template "_letterlist" $range.Letters }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
2
views/routes/index/head.gohtml
Normal file
2
views/routes/index/head.gohtml
Normal file
@@ -0,0 +1,2 @@
|
||||
<title>Lenz-Briefe</title>
|
||||
<meta name="description" content="Digitale Edition der Briefe von Jakob Michael Reinhold Lenz" />
|
||||
Reference in New Issue
Block a user