mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-28 08:45:32 +00:00
small changes
This commit is contained in:
1
pagemodels/almanach.go
Normal file
1
pagemodels/almanach.go
Normal file
@@ -0,0 +1 @@
|
||||
package pagemodels
|
||||
@@ -14,9 +14,3 @@ Ideen:
|
||||
- Tooltips
|
||||
|
||||
|
||||
06221 56 34 553
|
||||
hr. konuk
|
||||
9-15.30 Uhr
|
||||
|
||||
|
||||
von beratung sprechen
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -50,9 +50,7 @@
|
||||
<div class="grow"></div>
|
||||
{{- if not $i -}}
|
||||
<div class="backbutton">
|
||||
<a href="/reihen/?letter=A" class="no-underline">
|
||||
<i class="ri-arrow-left-long-line"></i> Alle Bände nach Reihentiteln
|
||||
</a>
|
||||
<a href="/reihen/?letter=A" class="no-underline"> <i class="ri-arrow-left-long-line"></i> Alle Bände nach Reihentiteln </a>
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
@@ -62,118 +60,5 @@
|
||||
{{ template "entrydata" $model }}
|
||||
|
||||
{{- if $model.result.Contents | len -}}
|
||||
<div class="container-oversize mt-0 pt-0" id="almanachcontents">
|
||||
<div class="flex relative justify-center">
|
||||
<div class="-translate-y-[50%] flex flex-col items-center">
|
||||
<h2 class="relative bg-stone-50 px-5 font-bold text-3xl w-max mb-1">Inhalt</h2>
|
||||
<div class="flex flex-row justify-center">
|
||||
<div class="bg-stone-200 text-sm px-3 py-0.5 rounded mt-1">
|
||||
{{- if $model.filters.Type -}}
|
||||
{{- $i := len $model.result.Contents -}}
|
||||
{{- if eq $i 1 -}}
|
||||
<b>{{- $i }}</b> Beitrag der Kategorie <b>{{ $model.filters.Type }}</b> ·
|
||||
{{- else -}}
|
||||
<b>{{- $i }}</b> Beiträge der Kategorie <b>{{ $model.filters.Type }}</b> ·
|
||||
{{- end -}}
|
||||
{{- else if $model.filters.OnlyScans -}}
|
||||
<i class="ri-image-line"></i>
|
||||
{{- $i := len $model.result.Contents -}}
|
||||
{{- if eq $i 1 -}}
|
||||
<b>{{- $i }} Digitalisat · </b>
|
||||
{{- else -}}
|
||||
<b>{{- $i }} Digitalisate ·</b>
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if eq (len $model.result.Contents) 1 -}}
|
||||
<b>{{- len $model.result.Contents }}</b> erfasster Beitrag ·
|
||||
{{- else -}}
|
||||
<b>{{- len $model.result.Contents }}</b> erfasste Beiträge ·
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<i class="ri-sort-number-asc"></i> Anzeige nach Reihenfolge
|
||||
</div>
|
||||
{{- if or $model.filters.Type $model.filters.OnlyScans -}}
|
||||
<div class="flex flex-row items-center justify-center ml-2.5">
|
||||
<div class="block bg-stone-200 text-sm px-3 py-0.5 rounded mt-1">
|
||||
<i class="ri-arrow-left-long-line"></i>
|
||||
<a
|
||||
href="./"
|
||||
hx-target="#almanachcontents"
|
||||
hx-select="#almanachcontents"
|
||||
hx-swap="outerHTML show:none"
|
||||
hx-indicator="body">
|
||||
Alle Beiträge anzeigen
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex flex-row justify-end">
|
||||
{{- if gt (len $model.result.Types) 1 -}}
|
||||
<div>
|
||||
<form
|
||||
method="GET"
|
||||
hx-boost="false"
|
||||
x-target="almanachcontents"
|
||||
aria-label="Filter für Beitragstypen">
|
||||
<label
|
||||
for="typefilter"
|
||||
class="align-baseline h-min self-end pb-1 mr-1.5 text-sm font-sans text-stone-700">
|
||||
Kategorie
|
||||
</label>
|
||||
<select
|
||||
class="h-min pb-1 border-b-4 border-zinc-300 px-1.5 mr-8"
|
||||
name="typefilter"
|
||||
id="typefilter"
|
||||
autocomplete="off"
|
||||
@change.debounce="$el.form.requestSubmit()">
|
||||
<option value="">Alle</option>
|
||||
{{- range $i, $t := $model.result.Types -}}
|
||||
<option
|
||||
value="{{- $t -}}"
|
||||
{{- if eq $model.filters.Type $t -}}selected{{- end -}}>
|
||||
{{- $t -}}
|
||||
</option>
|
||||
{{- end -}}
|
||||
</select>
|
||||
<button x-show="false">Filtern</button>
|
||||
</form>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- if $model.result.HasScans -}}
|
||||
<div>
|
||||
<form
|
||||
method="GET"
|
||||
hx-boost="false"
|
||||
x-target="almanachcontents"
|
||||
aria-label="Filter für digialisierte Beiträge">
|
||||
<label
|
||||
for="onlyscans"
|
||||
class="align-baseline h-min self-end pb-1 mr-1.5 text-sm font-sans text-stone-700">
|
||||
Nur Digitalisate anzeigen
|
||||
</label>
|
||||
<input
|
||||
class=""
|
||||
type="checkbox"
|
||||
id="onlyscans"
|
||||
name="onlyscans"
|
||||
autocomplete="off"
|
||||
@change.debounce="$el.form.requestSubmit()"
|
||||
{{ if $model.filters.OnlyScans -}}checked{{- end -}} />
|
||||
<button x-show="false">Filtern</button>
|
||||
</form>
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="mt-8">
|
||||
{{- range $i, $c := $model.result.Contents -}}
|
||||
{{- $rels := index $model.result.ContentsAgents $c.Id -}}
|
||||
{{- template "_content" Arr $c $model.result.Entry $rels $model.result.Agents -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ template "contents" $model }}
|
||||
{{- end -}}
|
||||
|
||||
80
views/routes/almanach/components/contents.gohtml
Normal file
80
views/routes/almanach/components/contents.gohtml
Normal file
@@ -0,0 +1,80 @@
|
||||
{{ $model := . }}
|
||||
|
||||
|
||||
<div class="container-oversize mt-0 pt-0" id="almanachcontents">
|
||||
<div class="flex relative justify-center">
|
||||
<div class="-translate-y-[50%] flex flex-col items-center">
|
||||
<h2 class="relative bg-stone-50 px-5 font-bold text-3xl w-max mb-1">Inhalt</h2>
|
||||
<div class="flex flex-row justify-center">
|
||||
<div class="bg-stone-200 text-sm px-3 py-0.5 rounded mt-1">
|
||||
{{- if $model.filters.Type -}}
|
||||
{{- $i := len $model.result.Contents -}}
|
||||
{{- if eq $i 1 -}}
|
||||
<b>{{- $i }}</b> Beitrag der Kategorie <b>{{ $model.filters.Type }}</b> ·
|
||||
{{- else -}}
|
||||
<b>{{- $i }}</b> Beiträge der Kategorie <b>{{ $model.filters.Type }}</b> ·
|
||||
{{- end -}}
|
||||
{{- else if $model.filters.OnlyScans -}}
|
||||
<i class="ri-image-line"></i>
|
||||
{{- $i := len $model.result.Contents -}}
|
||||
{{- if eq $i 1 -}}
|
||||
<b>{{- $i }} Digitalisat · </b>
|
||||
{{- else -}}
|
||||
<b>{{- $i }} Digitalisate ·</b>
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if eq (len $model.result.Contents) 1 -}}
|
||||
<b>{{- len $model.result.Contents }}</b> erfasster Beitrag ·
|
||||
{{- else -}}
|
||||
<b>{{- len $model.result.Contents }}</b> erfasste Beiträge ·
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<i class="ri-sort-number-asc"></i> Anzeige nach Reihenfolge
|
||||
</div>
|
||||
{{- if or $model.filters.Type $model.filters.OnlyScans -}}
|
||||
<div class="flex flex-row items-center justify-center ml-2.5">
|
||||
<div class="block bg-stone-200 text-sm px-3 py-0.5 rounded mt-1">
|
||||
<i class="ri-arrow-left-long-line"></i>
|
||||
<a href="./" hx-target="#almanachcontents" hx-select="#almanachcontents" hx-swap="outerHTML show:none" hx-indicator="body"> Alle Beiträge anzeigen </a>
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex flex-row justify-end">
|
||||
{{- if gt (len $model.result.Types) 1 -}}
|
||||
<div>
|
||||
<form method="GET" hx-boost="false" x-target="almanachcontents" aria-label="Filter für Beitragstypen">
|
||||
<label for="typefilter" class="align-baseline h-min self-end pb-1 mr-1.5 text-sm font-sans text-stone-700"> Kategorie </label>
|
||||
<select class="h-min pb-1 border-b-4 border-zinc-300 px-1.5 mr-8" name="typefilter" id="typefilter" autocomplete="off" @change.debounce="$el.form.requestSubmit()">
|
||||
<option value="">Alle</option>
|
||||
{{- range $i, $t := $model.result.Types -}}
|
||||
<option value="{{- $t -}}" {{- if eq $model.filters.Type $t -}}selected{{- end -}}>
|
||||
{{- $t -}}
|
||||
</option>
|
||||
{{- end -}}
|
||||
</select>
|
||||
<button x-show="false">Filtern</button>
|
||||
</form>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- if $model.result.HasScans -}}
|
||||
<div>
|
||||
<form method="GET" hx-boost="false" x-target="almanachcontents" aria-label="Filter für digialisierte Beiträge">
|
||||
<label for="onlyscans" class="align-baseline h-min self-end pb-1 mr-1.5 text-sm font-sans text-stone-700"> Nur Digitalisate anzeigen </label>
|
||||
<input class="" type="checkbox" id="onlyscans" name="onlyscans" autocomplete="off" @change.debounce="$el.form.requestSubmit()" {{ if $model.filters.OnlyScans -}}checked{{- end -}} />
|
||||
<button x-show="false">Filtern</button>
|
||||
</form>
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="mt-8">
|
||||
{{- range $i, $c := $model.result.Contents -}}
|
||||
{{- $rels := index $model.result.ContentsAgents $c.Id -}}
|
||||
{{- template "_content" Arr $c $model.result.Entry $rels $model.result.Agents -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user