Some Styling

This commit is contained in:
Simon Martens
2025-09-14 18:19:37 +02:00
parent 44c7258a50
commit 7fc3ee238c
19 changed files with 1778 additions and 452 deletions

View File

@@ -1,29 +1,53 @@
{{ if ne (len .model.Search) 1 }}
{{ $agent := index $.model.Agents .model.Search }}
{{ if not $agent }}
<div>Agent nicht gefunden: {{ .model.Search }}</div>
{{ else }}
<div>
{{ $letter := Upper (FirstLetter $agent.ID) }}
<a href="/akteure/{{ $letter }}">
&larr; Personen &amp; Körperschaften &ndash; Buchstabe
{{ $letter }}
</a>
<div class="max-w-4xl mx-auto px-4 py-8">
<div class="bg-red-50 border border-red-200 rounded-lg p-4">
<div class="flex items-center">
<i class="ri-error-warning-line text-red-600 text-xl mr-2"></i>
<span class="text-red-800">Person nicht gefunden: <strong>{{ .model.Search }}</strong></span>
</div>
</div>
</div>
{{ else }}
<div class="max-w-4xl mx-auto px-4 py-8">
<div class="mb-6">
{{ $letter := Upper (FirstLetter $agent.ID) }}
<a href="/akteure/{{ $letter }}" class="inline-flex items-center text-blue-600 hover:text-blue-800 transition-colors">
<i class="ri-arrow-left-line mr-2"></i>
Zurück zu Buchstabe {{ $letter }}
</a>
</div>
<div>{{ template "_akteur" $agent }}</div>
</div>
<div>{{ template "_akteur" $agent }}</div>
{{ end }}
{{ else }}
<div>
{{ range $_, $l := .model.AvailableLetters }}
<a href="/akteure/{{ $l }}">
{{ $l }}
</a>
{{ end }}
</div>
<div class="max-w-7xl mx-auto px-4 py-8">
<div class="mb-8">
<h1 class="text-3xl font-bold text-gray-900 mb-4">Personen & Körperschaften</h1>
<p class="text-gray-600">Verzeichnis aller in der Zeitung erwähnten Personen und Institutionen</p>
</div>
{{ range $_, $id := .model.Sorted }}
{{ $a := index $.model.Agents $id }}
{{ template "_akteur" $a }}
{{ end }}
<!-- Alphabet Navigation -->
<div class="mb-8 p-4 bg-gray-50 rounded-lg">
<div class="flex flex-wrap gap-2">
{{ range $_, $l := .model.AvailableLetters }}
<a href="/akteure/{{ $l }}" class="inline-flex items-center justify-center w-8 h-8 bg-white border border-gray-300 rounded hover:bg-blue-50 hover:border-blue-300 font-medium text-gray-700 hover:text-blue-700 transition-colors">
{{ $l }}
</a>
{{ end }}
</div>
</div>
<!-- People List - Dictionary Column Layout -->
<div class="columns-1 lg:columns-2 gap-8 space-y-0">
{{ range $_, $id := .model.Sorted }}
{{ $a := index $.model.Agents $id }}
<div class="break-inside-avoid mb-4 bg-stone-100 rounded-lg p-4 border border-stone-200">
{{ template "_akteur" $a }}
</div>
{{ end }}
</div>
</div>
{{ end }}

View File

@@ -1,31 +1,23 @@
{{ $model := .model }}
{{ $date := .model.Datum.When }}
<div>
<a href="/jahrgang/{{- $date.Year -}}">
Zum Jahr
{{ $date.Year }}
</a>
<div class="flex flex-row gap-x-2">
{{ if $model.Prev }}
<a href="/{{- $model.Prev.Datum.When.Year -}}/{{- $model.Prev.Number.No -}}">
&larr; Zurück
</a>
{{ end }}
{{ if $model.Images.HasImages }}
<div class="flex flex-col lg:flex-row gap-6 w-full min-h-screen mt-8">
<!-- Left side: Sticky Inhaltsverzeichnis -->
<div class="lg:w-1/3 xl:w-1/4 flex-shrink-0">
<div class="lg:sticky lg:top-12 lg:max-h-[calc(100vh-2rem)] lg:overflow-y-auto">
{{ template "_title_nav" . }}
{{ template "_inhaltsverzeichnis" . }}
</div>
</div>
{{ if $model.Next }}
<a href="/{{- $model.Next.Datum.When.Year -}}/{{- $model.Next.Number.No -}}">
Weiter &rarr;
</a>
{{ end }}
<!-- Right side: Newspaper pages -->
<div class="lg:w-2/3 xl:w-3/4 flex-1">
{{ template "_newspaper_layout" . }}
</div>
</div>
<div>
<div class="py-3 text-xl">
<div>{{ $date.Year }}</div>
<div>Stück {{ $model.Number.No }}</div>
<div>{{ WeekdayName $date.Weekday }}, {{ $date.Day }}. {{ MonthName $date.Month }}</div>
</div>
{{ else }}
<div class="max-w-4xl">
{{ template "_title_nav" . }}
{{ template "_inhaltsverzeichnis" . }}
</div>
{{ end }}

View File

@@ -0,0 +1,41 @@
{{ $model := .model }}
{{ $images := $model.Images }}
{{ if $images.HasImages }}
<div class="mt-6">
<h3 class="text-lg font-medium mb-4">Seiten der Ausgabe</h3>
{{- if $images.MainPages }}
<div class="mb-6">
<h4 class="text-md font-medium mb-2">Hauptausgabe</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
{{- range $images.MainPages -}}
{{- if .Available -}}
<div class="border rounded-lg p-2">
<h5 class="text-sm font-medium mb-2">Seite {{ .PageNumber }}</h5>
<img src="{{ .ImagePath }}" alt="Seite {{ .PageNumber }}" class="w-full h-auto border" loading="lazy">
</div>
{{- end -}}
{{- end -}}
</div>
</div>
{{- end }}
{{- range $beilageNum, $pages := $images.AdditionalPages -}}
{{- if $pages }}
<div class="mb-6">
<h4 class="text-md font-medium mb-2">Beilage {{ $beilageNum }}</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
{{- range $pages -}}
{{- if .Available -}}
<div class="border rounded-lg p-2">
<h5 class="text-sm font-medium mb-2">Seite {{ .PageNumber }}</h5>
<img src="{{ .ImagePath }}" alt="Beilage {{ $beilageNum }}, Seite {{ .PageNumber }}" class="w-full h-auto border" loading="lazy">
</div>
{{- end -}}
{{- end -}}
</div>
</div>
{{- end -}}
{{- end -}}
</div>
{{ end }}

View File

@@ -1,46 +1,55 @@
{{ $model := .model }}
<div class="max-w-[22rem] bg-slate-100 px-6 py-4 hyphens-auto">
<div class="w-full bg-white border border-slate-200 px-4 py-4 hyphens-auto rounded-lg">
{{- if $model.Pieces.Pages -}}
<div>
<div class="space-y-4">
<div class="flex items-center gap-2 mb-4">
<i class="ri-file-list-3-line text-slate-600"></i>
<h3 class="text-base font-semibold text-slate-800">Inhalt</h3>
</div>
{{ range $page := $model.Pieces.Pages }}
<div class="pt-4 first:pt-0 hyphens-auto">
<div class="font-bold">Seite {{ $page }}</div>
<ul class="">
<div class="mb-4 first:mb-0">
<div class="flex items-center gap-2 mb-3 pb-2 border-b border-slate-200">
<i class="ri-file-text-line text-blue-600 text-sm"></i>
<span class="font-medium text-slate-700 bg-blue-50 px-2 py-1 rounded text-xs">{{ $page }}</span>
</div>
<div class="space-y-3">
{{ range $piece := (index $model.Pieces.Items $page) }}
<li class="ml-0">
{{ template "_inhaltsverzeichnis_eintrag" $piece }}
<div class="py-2 px-3 bg-slate-50 rounded hover:bg-slate-100 transition-colors duration-200">
{{ template "_inhaltsverzeichnis_eintrag" $piece }}
<!-- Links zu anderen Teilen: -->
{{ if gt (len $piece.IssueRefs) 1 }}
<div>
{{ len $piece.IssueRefs }} Teile:
<div>
<div class="mt-3 pt-3 border-t border-slate-100">
<div class="flex items-center gap-2 mb-2">
<i class="ri-links-line text-blue-500 text-sm"></i>
<span class="text-sm font-medium text-slate-600">{{ len $piece.IssueRefs }} Teile:</span>
</div>
<div class="flex flex-wrap gap-2">
{{ range $issue := $piece.IssueRefs }}
<li>
<a
href="/{{- $issue.When -}}/{{- $issue.Nr -}}"
{{- if and (eq $issue.Nr $model.Number.No) (eq $issue.When.Year
$model.Datum.When.Year)
-}}
aria-current="page"
{{ end }}>
{{- $issue.When.Year }} Nr.
{{ $issue.Nr -}}
</a>
</li>
<a
href="/{{- $issue.When -}}/{{- $issue.Nr -}}"
class="inline-flex items-center gap-1 px-2 py-1 bg-blue-50 text-blue-700 rounded-md text-xs font-medium hover:bg-blue-100 transition-colors duration-150"
{{- if and (eq $issue.Nr $model.Number.No) (eq $issue.When.Year
$model.Datum.When.Year)
-}}
aria-current="page"
{{ end }}>
<i class="ri-calendar-line text-xs"></i>
{{- $issue.When.Year }} Nr. {{ $issue.Nr -}}
</a>
{{ end }}
</div>
</div>
{{ end }}
</li>
</div>
{{ end }}
<!-- Pages end -->
</ul>
</div>
</div>
{{- end -}}
</div>
@@ -49,45 +58,53 @@
<!-- Beilagen -->
{{- if $model.AdditionalPieces.Pages -}}
<div class="mt-8">
<div>Beilage</div>
<div class="mt-6 pt-6 border-t border-slate-300">
<div class="flex items-center gap-2 mb-4">
<i class="ri-attachment-line text-amber-600"></i>
<h3 class="text-base font-semibold text-slate-800">Beilage</h3>
</div>
{{ range $page := $model.AdditionalPieces.Pages }}
<div class="pt-4 first:pt-0 ">
<div class="">Seite {{ $page }}</div>
<ul class="list-disc list-inside">
<div class="mb-4 first:mb-0">
<div class="flex items-center gap-2 mb-3 pb-2 border-b border-slate-200">
<i class="ri-file-text-line text-amber-600 text-sm"></i>
<span class="font-medium text-slate-700 bg-amber-50 px-2 py-1 rounded text-xs">{{ $page }}</span>
</div>
<div class="space-y-3">
{{ range $piece := (index $model.AdditionalPieces.Items $page) }}
<li class="ml-0">
{{ template "_inhaltsverzeichnis_eintrag" $piece }}
<div class="py-2 px-3 bg-slate-50 rounded hover:bg-slate-100 transition-colors duration-200">
{{ template "_inhaltsverzeichnis_eintrag" $piece }}
<!-- Links zu anderen Teilen: -->
{{ if gt (len $piece.IssueRefs) 1 }}
<div>
{{ len $piece.IssueRefs }} Teile:
<div>
<div class="mt-3 pt-3 border-t border-slate-100">
<div class="flex items-center gap-2 mb-2">
<i class="ri-links-line text-blue-500 text-sm"></i>
<span class="text-sm font-medium text-slate-600">{{ len $piece.IssueRefs }} Teile:</span>
</div>
<div class="flex flex-wrap gap-2">
{{ range $issue := $piece.IssueRefs }}
<li>
<a
href="/{{- $issue.When -}}/{{- $issue.Nr -}}"
{{- if and (eq $issue.Nr $model.Number.No) (eq $issue.When.Year
$model.Datum.When.Year)
-}}
aria-current="page"
{{ end }}>
{{- $issue.When.Year }} Nr.
{{ $issue.Nr -}}
</a>
</li>
<a
href="/{{- $issue.When -}}/{{- $issue.Nr -}}"
class="inline-flex items-center gap-1 px-2 py-1 bg-blue-50 text-blue-700 rounded-md text-xs font-medium hover:bg-blue-100 transition-colors duration-150"
{{- if and (eq $issue.Nr $model.Number.No) (eq $issue.When.Year
$model.Datum.When.Year)
-}}
aria-current="page"
{{ end }}>
<i class="ri-calendar-line text-xs"></i>
{{- $issue.When.Year }} Nr. {{ $issue.Nr -}}
</a>
{{ end }}
</div>
</div>
{{ end }}
</li>
</div>
{{ end }}
<!-- Pages end -->
</ul>
</div>
</div>
{{- end -}}
</div>

View File

@@ -1,79 +1,288 @@
{{ $piece := . }}
{{- $piece := . -}}
<div class="entry-description leading-relaxed mb-2">
{{- $hasRezension := false -}}
{{- $hasWeltnachrichten := false -}}
{{- $hasEinkommendeFremde := false -}}
{{- $hasWechselkurse := false -}}
{{- $hasBuecher := false -}}
{{- $hasLokalanzeigen := false -}}
{{- $hasLokalnachrichten := false -}}
{{- $hasLotterie := false -}}
{{- $hasGedicht := false -}}
{{- $hasVorladung := false -}}
{{- $hasAuszug := false -}}
{{- $hasAufsatz := false -}}
{{- $hasGelehrteNachrichten := false -}}
{{- $hasTheaterkritik := false -}}
{{- $hasUebersetzung := false -}}
{{- $hasKommentar := false -}}
{{- $hasNachruf := false -}}
{{- $hasReplik := false -}}
{{- $hasProklamation := false -}}
{{- $hasIneigenersache := false -}}
{{- $hasBrief := false -}}
{{- $hasAnzeige := false -}}
{{- $hasDesertionsliste := false -}}
{{- $hasNotenblatt := false -}}
{{- $hasVorlesungsverzeichnis := false -}}
{{- $hasErzaehlung := false -}}
{{- $hasNachtrag := false -}}
{{- $hasPanegyrik := false -}}
{{- $hasKriminalanzeige := false -}}
{{- $hasAbbildung := false -}}
{{- $hasRezepte := false -}}
{{- $hasKorrektur := false -}}
<!-- Autor(en) -->
{{ if $piece.AgentRefs }}
<div class="authors">
{{ range $agentref := $piece.AgentRefs }}
{{ if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) }}
{{ $agent := GetAgent $agentref.Ref }}
{{- if gt (len $agent.Names) 0 -}}
<a href="/akteure/{{ $agentref.Ref }}" class="inline-block">
{{- index $agent.Names 0 -}}
</a>
{{ end }}
{{ end }}
{{ end }}
</div>
{{ end }}
{{- range $catref := $piece.CategoryRefs -}}
{{- if eq $catref.Ref "rezension" -}}{{- $hasRezension = true -}}{{- end -}}
{{- if eq $catref.Ref "weltnachrichten" -}}{{- $hasWeltnachrichten = true -}}{{- end -}}
{{- if eq $catref.Ref "einkommende-fremde" -}}{{- $hasEinkommendeFremde = true -}}{{- end -}}
{{- if eq $catref.Ref "wechselkurse" -}}{{- $hasWechselkurse = true -}}{{- end -}}
{{- if eq $catref.Ref "buecher" -}}{{- $hasBuecher = true -}}{{- end -}}
{{- if eq $catref.Ref "lokalanzeigen" -}}{{- $hasLokalanzeigen = true -}}{{- end -}}
{{- if eq $catref.Ref "lokalnachrichten" -}}{{- $hasLokalnachrichten = true -}}{{- end -}}
{{- if eq $catref.Ref "lotterie" -}}{{- $hasLotterie = true -}}{{- end -}}
{{- if eq $catref.Ref "gedicht" -}}{{- $hasGedicht = true -}}{{- end -}}
{{- if eq $catref.Ref "vorladung" -}}{{- $hasVorladung = true -}}{{- end -}}
{{- if eq $catref.Ref "auszug" -}}{{- $hasAuszug = true -}}{{- end -}}
{{- if eq $catref.Ref "aufsatz" -}}{{- $hasAufsatz = true -}}{{- end -}}
{{- if eq $catref.Ref "gelehrte-nachrichten" -}}{{- $hasGelehrteNachrichten = true -}}{{- end -}}
{{- if eq $catref.Ref "theaterkritik" -}}{{- $hasTheaterkritik = true -}}{{- end -}}
{{- if eq $catref.Ref "uebersetzung" -}}{{- $hasUebersetzung = true -}}{{- end -}}
{{- if eq $catref.Ref "kommentar" -}}{{- $hasKommentar = true -}}{{- end -}}
{{- if eq $catref.Ref "nachruf" -}}{{- $hasNachruf = true -}}{{- end -}}
{{- if eq $catref.Ref "replik" -}}{{- $hasReplik = true -}}{{- end -}}
{{- if eq $catref.Ref "proklamation" -}}{{- $hasProklamation = true -}}{{- end -}}
{{- if eq $catref.Ref "ineigenersache" -}}{{- $hasIneigenersache = true -}}{{- end -}}
{{- if eq $catref.Ref "brief" -}}{{- $hasBrief = true -}}{{- end -}}
{{- if eq $catref.Ref "anzeige" -}}{{- $hasAnzeige = true -}}{{- end -}}
{{- if eq $catref.Ref "desertionsliste" -}}{{- $hasDesertionsliste = true -}}{{- end -}}
{{- if eq $catref.Ref "notenblatt" -}}{{- $hasNotenblatt = true -}}{{- end -}}
{{- if eq $catref.Ref "vorlesungsverzeichnis" -}}{{- $hasVorlesungsverzeichnis = true -}}{{- end -}}
{{- if eq $catref.Ref "erzaehlung" -}}{{- $hasErzaehlung = true -}}{{- end -}}
{{- if eq $catref.Ref "nachtrag" -}}{{- $hasNachtrag = true -}}{{- end -}}
{{- if eq $catref.Ref "panegyrik" -}}{{- $hasPanegyrik = true -}}{{- end -}}
{{- if eq $catref.Ref "kriminalanzeige" -}}{{- $hasKriminalanzeige = true -}}{{- end -}}
{{- if eq $catref.Ref "abbildung" -}}{{- $hasAbbildung = true -}}{{- end -}}
{{- if eq $catref.Ref "rezepte" -}}{{- $hasRezepte = true -}}{{- end -}}
{{- if eq $catref.Ref "korrektur" -}}{{- $hasKorrektur = true -}}{{- end -}}
{{- end -}}
{{- range $workref := $piece.WorkRefs -}}
{{- $kat := $workref.Category -}}
{{- if not $kat -}}{{- $kat = "rezension" -}}{{- end -}}
{{- if eq $kat "rezension" -}}{{- $hasRezension = true -}}{{- end -}}
{{- if eq $kat "auszug" -}}{{- $hasAuszug = true -}}{{- end -}}
{{- if eq $kat "theaterkritik" -}}{{- $hasTheaterkritik = true -}}{{- end -}}
{{- if eq $kat "uebersetzung" -}}{{- $hasUebersetzung = true -}}{{- end -}}
{{- if eq $kat "kommentar" -}}{{- $hasKommentar = true -}}{{- end -}}
{{- if eq $kat "anzeige" -}}{{- $hasAnzeige = true -}}{{- end -}}
{{- if eq $kat "replik" -}}{{- $hasReplik = true -}}{{- end -}}
{{- end -}}
<!-- Kategorien -->
<div class="">
<!-- Einzelkategorien -->
{{ if $piece.CategoryRefs }}
{{ range $catref := $piece.CategoryRefs }}
{{ $category := GetCategory $catref.Ref }}
{{- if gt (len $category.Names) 0 -}}
<div class="category inline-block">{{- index $category.Names 0 -}}</div>
{{ end }}
{{ end }}
{{ end }}
{{- if $piece.Title -}}
<div class="">{{- index $piece.Title 0 -}}</div>
{{- else if $piece.Incipit -}}
<div class="">{{- index $piece.Incipit 0 -}}</div>
{{- $place := "" -}}
{{- if $piece.PlaceRefs -}}
{{- $placeObj := GetPlace (index $piece.PlaceRefs 0).Ref -}}
{{- if gt (len $placeObj.Names) 0 -}}
{{- $place = index $placeObj.Names 0 -}}
{{- end -}}
{{- end -}}
{{- if $piece.PlaceRefs -}}
{{ $place := GetPlace (index $piece.PlaceRefs 0).Ref }}
{{- if gt (len $place.Names) 0 -}}
<div class="">{{- index $place.Names 0 -}}</div>
{{- $title := "" -}}
{{- if $piece.Title -}}
{{- $title = index $piece.Title 0 -}}
{{- else if $piece.Incipit -}}
{{- $title = index $piece.Incipit 0 -}}
{{- end -}}
{{- $workTitle := "" -}}
{{- $workAuthorName := "" -}}
{{- $workAuthorID := "" -}}
{{- if $piece.WorkRefs -}}
{{- $work := GetWork (index $piece.WorkRefs 0).Ref -}}
{{- if $work.PreferredTitle -}}
{{- $workTitle = $work.PreferredTitle -}}
{{- else if $work.Citation.Title -}}
{{- $workTitle = $work.Citation.Title -}}
{{- else if $work.Citation.Chardata -}}
{{- $workTitle = $work.Citation.Chardata -}}
{{- end -}}
{{- /* Get work author */ -}}
{{- if $work.AgentRefs -}}
{{- range $workAgentRef := $work.AgentRefs -}}
{{- if (or (eq $workAgentRef.Category "") (eq $workAgentRef.Category "autor")) -}}
{{- $workAgent := GetAgent $workAgentRef.Ref -}}
{{- if and $workAgent (gt (len $workAgent.Names) 0) -}}
{{- $workAuthorName = index $workAgent.Names 0 -}}
{{- $workAuthorID = $workAgentRef.Ref -}}
{{- break -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- /* Generate natural text descriptions */ -}}
<!-- Kategorie Werk -->
{{ if $piece.WorkRefs }}
{{ range $workref := $piece.WorkRefs }}
{{ $work := GetWork $workref.Ref }}
<!-- What we do depends on the category -->
{{- $kat := $workref.Category }}
{{- if not $kat }}
{{- $kat = "rezension" -}}
{{- if $hasRezension -}}
{{- $authorFound := false -}}
{{- range $agentref := $piece.AgentRefs -}}
{{- if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) -}}
{{- $agent := GetAgent $agentref.Ref -}}
{{- if gt (len $agent.Names) 0 -}}
<a href="/akteure/{{ $agentref.Ref }}" class="author-link">{{ index $agent.Names 0 }}</a>{{ if $workTitle }}, Rezension: <em>{{ $workTitle }}</em>{{ if $workAuthorName }} von <a href="/akteure/{{ $workAuthorID }}" class="author-link">{{ $workAuthorName }}</a>{{ end }}{{ else if $title }}, Rezension: <em>{{ $title }}</em>{{ else }}, Rezension{{ end }}{{ if $place }} ({{ $place }}){{ end }}
{{- $authorFound = true -}}
{{- break -}}
{{- end -}}
{{- $category := GetCategory $kat -}}
{{- if gt (len $category.Names) 0 -}}
<div class="category inline-block">{{- index $category.Names 0 -}}</div>
{{- end -}}
{{- if $work.PreferredTitle -}}
<div class="">{{- $work.PreferredTitle -}}</div>
{{- else if $work.Citation.Title -}}
<div class="">{{- $work.Citation.Title -}}</div>
{{- else -}}
<div class="">{{- $work.Citation.Chardata -}}</div>
{{- end -}}
{{- end -}}
{{- end -}}
{{- if not $authorFound -}}
Rezension{{ if $workTitle }}: <em>{{ $workTitle }}</em>{{ if $workAuthorName }} von <a href="/akteure/{{ $workAuthorID }}" class="author-link">{{ $workAuthorName }}</a>{{ end }}{{ else if $title }}: <em>{{ $title }}</em>{{ end }}{{ if $place }} ({{ $place }}){{ end }}
{{- end -}}
{{- else if $hasWeltnachrichten -}}
Politische Nachrichten aus aller Welt
{{- else if $hasEinkommendeFremde -}}
{{- if $hasLokalnachrichten -}}Lokale Meldungen über einreisende Fremde{{- else if $hasNachruf -}}Nachruf und Einreiseliste{{- else -}}Einreiseliste{{- end -}}{{ if $place }} für {{ $place }}{{ end }}
{{- else if $hasWechselkurse -}}
Wechselkurse{{ if $place }} in {{ $place }}{{ end }}
{{- else if $hasBuecher -}}
Bücheranzeigen{{ if $title }}: {{ $title }}{{ end }}
{{- else if $hasLokalanzeigen -}}
{{ if $hasNachruf }}Todesanzeige{{ else }}Lokalanzeige{{ end }}{{ if $place }} aus {{ $place }}{{ end }}{{ if $title }}: {{ $title }}{{ end }}
{{- else if $hasLokalnachrichten -}}
{{ if $hasLotterie }}Lotterienachrichten{{ else if $hasNachruf }}Nachrufe{{ else if $hasTheaterkritik }}Theaternachrichten{{ else if $hasPanegyrik }}Festlichkeiten{{ else }}Lokalnachrichten{{ end }}{{ if $place }} aus {{ $place }}{{ end }}
{{- else if $hasGedicht -}}
{{- $authorFound := false -}}
{{- range $agentref := $piece.AgentRefs -}}
{{- if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) -}}
{{- $agent := GetAgent $agentref.Ref -}}
{{- if gt (len $agent.Names) 0 -}}
<a href="/akteure/{{ $agentref.Ref }}" class="author-link">{{ index $agent.Names 0 }}</a>, {{ if $hasKommentar }}Gedicht mit Kommentar{{ else if $hasUebersetzung }}Gedichtübersetzung{{ else if $hasGelehrteNachrichten }}Gedicht zu gelehrten Angelegenheiten{{ else }}Gedicht{{ end }}{{ if $title }}: „{{ $title }}"{{ end }}
{{- $authorFound = true -}}
{{- break -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if not $authorFound -}}
{{ if $hasKommentar }}Gedicht mit Kommentar{{ else if $hasUebersetzung }}Gedichtübersetzung{{ else if $hasGelehrteNachrichten }}Gedicht zu gelehrten Angelegenheiten{{ else }}Gedicht{{ end }}{{ if $title }}: „{{ $title }}"{{ end }}
{{- end -}}
{{- else if $hasVorladung -}}
Gerichtliche Vorladung{{ if $place }} in {{ $place }}{{ end }}{{ if $title }}: {{ $title }}{{ end }}
{{- else if $hasAufsatz -}}
{{- $authorFound := false -}}
{{- range $agentref := $piece.AgentRefs -}}
{{- if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) -}}
{{- $agent := GetAgent $agentref.Ref -}}
{{- if gt (len $agent.Names) 0 -}}
<a href="/akteure/{{ $agentref.Ref }}" class="author-link">{{ index $agent.Names 0 }}</a>, {{ if $hasReplik }}Erwiderung{{ else if $hasUebersetzung }}Übersetzung{{ else if $hasNachruf }}Nachruf{{ else if $hasKommentar }}Kommentar{{ else if $hasRezepte }}Rezepte und Anleitungen{{ else }}Aufsatz{{ end }}{{ if $title }}: „{{ $title }}"{{ end }}
{{- $authorFound = true -}}
{{- break -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if not $authorFound -}}
{{ if $hasReplik }}Erwiderung{{ else if $hasUebersetzung }}Übersetzung{{ else if $hasNachruf }}Nachruf{{ else if $hasKommentar }}Kommentar{{ else if $hasRezepte }}Rezepte und Anleitungen{{ else }}Aufsatz{{ end }}{{ if $title }}: „{{ $title }}"{{ end }}
{{- end -}}
{{- else if $hasGelehrteNachrichten -}}
{{ if $hasTheaterkritik }}Theaterkritik{{ else if $hasKommentar }}Gelehrter Kommentar{{ else }}Gelehrte Nachrichten{{ end }}{{ if $place }} aus {{ $place }}{{ end }}
{{- else if $hasTheaterkritik -}}
{{- $authorFound := false -}}
{{- range $agentref := $piece.AgentRefs -}}
{{- if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) -}}
{{- $agent := GetAgent $agentref.Ref -}}
{{- if gt (len $agent.Names) 0 -}}
<a href="/akteure/{{ $agentref.Ref }}" class="author-link">{{ index $agent.Names 0 }}</a>, Theaterkritik{{ if $workTitle }} zu <em>{{ $workTitle }}</em>{{ if $workAuthorName }} von <a href="/akteure/{{ $workAuthorID }}" class="author-link">{{ $workAuthorName }}</a>{{ end }}{{ else if $title }} zu <em>{{ $title }}</em>{{ end }}{{ if $place }} ({{ $place }}){{ end }}
{{- $authorFound = true -}}
{{- break -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if not $authorFound -}}
Theaterkritik{{ if $workTitle }} zu <em>{{ $workTitle }}</em>{{ if $workAuthorName }} von <a href="/akteure/{{ $workAuthorID }}" class="author-link">{{ $workAuthorName }}</a>{{ end }}{{ else if $title }} zu <em>{{ $title }}</em>{{ end }}{{ if $place }} ({{ $place }}){{ end }}
{{- end -}}
{{- else if $hasProklamation -}}
Amtliche Proklamation{{ if $title }}: {{ $title }}{{ end }}
{{- else if $hasIneigenersache -}}
{{ if $hasKommentar }}{{ if $hasNachtrag }}Ergänzender Kommentar{{ else }}Redaktioneller Kommentar{{ end }}{{ else if $hasReplik }}Redaktionelle Stellungnahme{{ else }}Anmerkung der Redaktion{{ end }}{{ if $title }}: {{ $title }}{{ end }}
{{- else if $hasBrief -}}
{{ if $hasNachruf }}Kondolenzbrief{{ else }}Leserbrief{{ end }}{{- $authorFound := false -}}{{- range $agentref := $piece.AgentRefs -}}{{- if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) -}}{{- $agent := GetAgent $agentref.Ref -}}{{- if gt (len $agent.Names) 0 -}} von <a href="/akteure/{{ $agentref.Ref }}" class="author-link">{{ index $agent.Names 0 }}</a>{{- $authorFound = true -}}{{- break -}}{{- end -}}{{- end -}}{{- end -}}{{ if $place }} aus {{ $place }}{{ end }}
{{- else if $hasDesertionsliste -}}
Desertionsliste{{ if $place }} für {{ $place }}{{ end }}
{{- else if $hasNotenblatt -}}
{{ if $hasNachtrag }}Ergänztes {{ end }}Notenblatt{{ if $title }}: {{ $title }}{{ end }}
{{- else if $hasVorlesungsverzeichnis -}}
Vorlesungsverzeichnis{{ if $place }} der Universität {{ $place }}{{ end }}
{{- else if $hasErzaehlung -}}
{{- $authorFound := false -}}
{{- range $agentref := $piece.AgentRefs -}}
{{- if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) -}}
{{- $agent := GetAgent $agentref.Ref -}}
{{- if gt (len $agent.Names) 0 -}}
<a href="/akteure/{{ $agentref.Ref }}" class="author-link">{{ index $agent.Names 0 }}</a>, {{ if $hasUebersetzung }}Übersetzung einer Erzählung{{ else }}Erzählung{{ end }}{{ if $title }}: „{{ $title }}"{{ end }}
{{- $authorFound = true -}}
{{- break -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if not $authorFound -}}
{{ if $hasUebersetzung }}Übersetzung einer Erzählung{{ else }}Erzählung{{ end }}{{ if $title }}: „{{ $title }}"{{ end }}
{{- end -}}
{{- else if $hasAbbildung -}}
{{ if $hasAufsatz }}Illustrierter Aufsatz{{ else }}Abbildung{{ end }}{{ if $title }}: {{ $title }}{{ end }}
{{- else if $hasKriminalanzeige -}}
Kriminalanzeige{{ if $place }} aus {{ $place }}{{ end }}
{{- else if $hasKorrektur -}}
Korrektur{{ if $title }}: {{ $title }}{{ end }}
{{- else if $hasAnzeige -}}
{{ if $hasAuszug }}{{ if $hasGedicht }}Gedichtauszug{{ else }}Textauszug{{ end }}{{ else }}Anzeige{{ end }}{{ if $title }}: {{ $title }}{{ end }}
{{- else if $hasAuszug -}}
Auszug{{ if $title }}: „{{ $title }}"{{ end }}{{ if $workTitle }} aus <em>{{ $workTitle }}</em>{{ if $workAuthorName }} von <a href="/akteure/{{ $workAuthorID }}" class="author-link">{{ $workAuthorName }}</a>{{ end }}{{ end }}
{{- else -}}
{{- $authorFound := false -}}
{{- range $agentref := $piece.AgentRefs -}}
{{- if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) -}}
{{- $agent := GetAgent $agentref.Ref -}}
{{- if gt (len $agent.Names) 0 -}}
<a href="/akteure/{{ $agentref.Ref }}" class="author-link">{{ index $agent.Names 0 }}</a>{{ if $title }}: {{ $title }}{{ end }}{{ if $workTitle }}{{ if $title }} aus {{ end }}<em>{{ $workTitle }}</em>{{ if $workAuthorName }} von <a href="/akteure/{{ $workAuthorID }}" class="author-link">{{ $workAuthorName }}</a>{{ end }}{{ end }}
{{- $authorFound = true -}}
{{- break -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if not $authorFound -}}
{{ if $title }}{{ $title }}{{ end }}{{ if $workTitle }}{{ if $title }} aus {{ end }}<em>{{ $workTitle }}</em>{{ if $workAuthorName }} von <a href="/akteure/{{ $workAuthorID }}" class="author-link">{{ $workAuthorName }}</a>{{ end }}{{ else if not $title }}Beitrag ohne Titel{{ end }}
{{- end -}}
{{- end -}}
</div>
<!-- Notizen -->
{{ range $annotation := $piece.AnnotationNote.Annotations }}
<div class="italic">
{{ $annotation.Inner.InnerXML }}
</div>
{{ end }}
{{- range $annotation := $piece.AnnotationNote.Annotations -}}
<div class="italic text-xs mt-1 text-slate-600">
{{ $annotation.Inner.InnerXML }}
</div>
{{- end -}}

View File

@@ -0,0 +1,292 @@
{{ $model := .model }}
{{ $images := $model.Images }}
<div class="space-y-8 h-full relative" id="newspaper-content">
<!-- Main Issue Pages -->
{{ if $images.MainPages }}
{{ $pages := $images.MainPages }}
{{ $pageCount := len $pages }}
<div class="space-y-6">
<!-- First page (single) -->
{{ if ge $pageCount 1 }}
{{ $firstPage := index $pages 0 }}
{{ if $firstPage.Available }}
<div class="newspaper-page-container">
<div class="mb-3">
<div class="flex items-center gap-2 mb-2">
<i class="ri-file-image-line text-blue-600"></i>
<span class="text-sm font-medium text-slate-600 bg-blue-50 px-2 py-1 rounded">{{ $firstPage.PageNumber }}</span>
</div>
</div>
<div class="single-page bg-white p-4 rounded-lg border border-slate-200 hover:border-slate-300 transition-colors duration-200">
<img src="{{ $firstPage.ImagePath }}"
alt="Seite {{ $firstPage.PageNumber }}"
class="newspaper-page-image cursor-pointer rounded-md hover:scale-[1.02] transition-transform duration-200"
onclick="enlargePage(this, {{ $firstPage.PageNumber }}, false)"
data-page="{{ $firstPage.PageNumber }}"
loading="lazy">
</div>
</div>
{{ end }}
{{ end }}
<!-- Middle pages (double spread) -->
{{ if ge $pageCount 4 }}
{{ $middlePage1 := index $pages 1 }}
{{ $middlePage2 := index $pages 2 }}
{{ if and $middlePage1.Available $middlePage2.Available }}
<div class="newspaper-page-container">
<div class="mb-3">
<div class="flex items-center gap-2 mb-2">
<i class="ri-file-copy-2-line text-green-600"></i>
<span class="text-sm font-medium text-slate-600 bg-green-50 px-2 py-1 rounded">{{ $middlePage1.PageNumber }}-{{ $middlePage2.PageNumber }}</span>
</div>
</div>
<div class="double-spread bg-white p-4 rounded-lg border border-slate-200 hover:border-slate-300 transition-colors duration-200">
<img src="{{ $middlePage1.ImagePath }}"
alt="Seite {{ $middlePage1.PageNumber }}"
class="newspaper-page-image cursor-pointer rounded-md hover:scale-[1.02] transition-transform duration-200"
onclick="enlargePage(this, {{ $middlePage1.PageNumber }}, true)"
data-page="{{ $middlePage1.PageNumber }}"
loading="lazy">
<img src="{{ $middlePage2.ImagePath }}"
alt="Seite {{ $middlePage2.PageNumber }}"
class="newspaper-page-image cursor-pointer rounded-md hover:scale-[1.02] transition-transform duration-200"
onclick="enlargePage(this, {{ $middlePage2.PageNumber }}, true)"
data-page="{{ $middlePage2.PageNumber }}"
loading="lazy">
</div>
</div>
{{ end }}
{{ end }}
<!-- Last page (single) -->
{{ if ge $pageCount 4 }}
{{ $lastPage := index $pages 3 }}
{{ if $lastPage.Available }}
<div class="newspaper-page-container">
<div class="mb-3">
<div class="flex items-center gap-2 mb-2">
<i class="ri-file-image-line text-blue-600"></i>
<span class="text-sm font-medium text-slate-600 bg-blue-50 px-3 py-1 rounded-full">Seite {{ $lastPage.PageNumber }}</span>
</div>
</div>
<div class="single-page bg-white p-4 rounded-lg border border-slate-200 hover:border-slate-300 transition-colors duration-200">
<img src="{{ $lastPage.ImagePath }}"
alt="Seite {{ $lastPage.PageNumber }}"
class="newspaper-page-image cursor-pointer rounded-md hover:scale-[1.02] transition-transform duration-200"
onclick="enlargePage(this, {{ $lastPage.PageNumber }}, false)"
data-page="{{ $lastPage.PageNumber }}"
loading="lazy">
</div>
</div>
{{ end }}
{{ end }}
</div>
{{ end }}
<!-- Beilage Pages -->
{{ range $beilageNum, $beilagePages := $images.AdditionalPages }}
{{ if $beilagePages }}
<div class="space-y-6 mt-12 pt-8 border-t-2 border-amber-200">
<!-- Header for beilage -->
<div class="flex items-center gap-3 mb-6">
<i class="ri-attachment-line text-2xl text-amber-600"></i>
<h2 class="text-xl font-semibold text-slate-800">Beilage {{ $beilageNum }}</h2>
</div>
{{ $pageCount := len $beilagePages }}
<!-- First page of beilage -->
{{ if ge $pageCount 1 }}
{{ $firstPage := index $beilagePages 0 }}
{{ if $firstPage.Available }}
<div class="newspaper-page-container">
<div class="mb-3">
<div class="flex items-center gap-2 mb-2">
<i class="ri-file-image-line text-amber-600"></i>
<span class="text-sm font-medium text-slate-600 bg-amber-50 px-2 py-1 rounded">{{ $firstPage.PageNumber }}</span>
</div>
</div>
<div class="single-page bg-white p-4 rounded-lg border border-amber-200 hover:border-amber-300 transition-colors duration-200">
<img src="{{ $firstPage.ImagePath }}"
alt="Beilage {{ $beilageNum }}, Seite {{ $firstPage.PageNumber }}"
class="newspaper-page-image cursor-pointer rounded-md hover:scale-[1.02] transition-transform duration-200"
onclick="enlargePage(this, {{ $firstPage.PageNumber }}, false)"
data-page="{{ $firstPage.PageNumber }}"
loading="lazy">
</div>
</div>
{{ end }}
{{ end }}
<!-- If beilage has 4+ pages, show middle spread -->
{{ if ge $pageCount 4 }}
{{ $middlePage1 := index $beilagePages 1 }}
{{ $middlePage2 := index $beilagePages 2 }}
{{ if and $middlePage1.Available $middlePage2.Available }}
<div class="newspaper-page-container">
<h4 class="text-sm font-medium mb-2">Beilage {{ $beilageNum }}, Seiten {{ $middlePage1.PageNumber }}-{{ $middlePage2.PageNumber }}</h4>
<div class="double-spread">
<img src="{{ $middlePage1.ImagePath }}"
alt="Beilage {{ $beilageNum }}, Seite {{ $middlePage1.PageNumber }}"
class="newspaper-page-image cursor-pointer border shadow-md"
onclick="enlargePage(this, {{ $middlePage1.PageNumber }}, true)"
loading="lazy">
<img src="{{ $middlePage2.ImagePath }}"
alt="Beilage {{ $beilageNum }}, Seite {{ $middlePage2.PageNumber }}"
class="newspaper-page-image cursor-pointer border shadow-md"
onclick="enlargePage(this, {{ $middlePage2.PageNumber }}, true)"
loading="lazy">
</div>
</div>
{{ end }}
{{ else if eq $pageCount 2 }}
<!-- If only 2 pages, show as spread -->
{{ $page2 := index $beilagePages 1 }}
{{ if $page2.Available }}
<div class="newspaper-page-container">
<h4 class="text-sm font-medium mb-2">Beilage {{ $beilageNum }}, Seite {{ $page2.PageNumber }}</h4>
<div class="single-page">
<img src="{{ $page2.ImagePath }}"
alt="Beilage {{ $beilageNum }}, Seite {{ $page2.PageNumber }}"
class="newspaper-page-image cursor-pointer border shadow-md"
onclick="enlargePage(this, {{ $page2.PageNumber }}, false)"
loading="lazy">
</div>
</div>
{{ end }}
{{ end }}
<!-- Last page of beilage (if 4+ pages) -->
{{ if ge $pageCount 4 }}
{{ $lastPage := index $beilagePages 3 }}
{{ if $lastPage.Available }}
<div class="newspaper-page-container">
<h4 class="text-sm font-medium mb-2">Beilage {{ $beilageNum }}, Seite {{ $lastPage.PageNumber }}</h4>
<div class="single-page">
<img src="{{ $lastPage.ImagePath }}"
alt="Beilage {{ $beilageNum }}, Seite {{ $lastPage.PageNumber }}"
class="newspaper-page-image cursor-pointer border shadow-md"
onclick="enlargePage(this, {{ $lastPage.PageNumber }}, false)"
loading="lazy">
</div>
</div>
{{ end }}
{{ end }}
</div>
{{ end }}
{{ end }}
</div>
<!-- Modal for enlarged view - positioned within newspaper content -->
<div id="pageModal" class="absolute inset-0 bg-black bg-opacity-75 hidden z-50 flex items-center justify-center backdrop-blur-sm" onclick="closeModal()">
<div class="relative max-w-full max-h-full p-4">
<img id="modalImage" src="" alt="" class="max-w-full max-h-full object-contain rounded-lg">
<button onclick="closeModal()" class="absolute top-2 right-2 text-white bg-slate-800 bg-opacity-80 rounded-full w-10 h-10 flex items-center justify-center hover:bg-opacity-100 transition-all duration-200">
<i class="ri-close-line text-xl"></i>
</button>
</div>
</div>
<style>
.newspaper-page-container {
margin-bottom: 2rem;
}
.single-page {
display: flex;
justify-content: center;
}
.single-page .newspaper-page-image {
max-width: min(400px, 100%);
width: 100%;
height: auto;
}
.double-spread {
display: flex;
gap: 1rem;
justify-content: center;
width: 100%;
}
.double-spread .newspaper-page-image {
max-width: min(350px, 48%);
width: 100%;
height: auto;
flex: 1;
}
/* Larger screens - maximize available space */
@media (min-width: 1280px) {
.single-page .newspaper-page-image {
max-width: min(600px, 100%);
}
.double-spread .newspaper-page-image {
max-width: min(500px, 48%);
}
}
/* Very wide screens - take advantage of the full width */
@media (min-width: 1536px) {
.single-page .newspaper-page-image {
max-width: min(700px, 100%);
}
.double-spread .newspaper-page-image {
max-width: min(600px, 48%);
}
}
/* Medium screens */
@media (max-width: 1024px) {
.double-spread {
flex-direction: column;
align-items: center;
}
.double-spread .newspaper-page-image {
max-width: 400px;
width: 100%;
}
}
/* Mobile */
@media (max-width: 640px) {
.single-page .newspaper-page-image,
.double-spread .newspaper-page-image {
max-width: 100%;
}
}
</style>
<script>
function enlargePage(imgElement, pageNumber, isFromSpread) {
const modal = document.getElementById('pageModal');
const modalImage = document.getElementById('modalImage');
modalImage.src = imgElement.src;
modalImage.alt = imgElement.alt;
modal.classList.remove('hidden');
// Highlight current page in Inhaltsverzeichnis if you implement that
// markCurrentPage(pageNumber);
}
function closeModal() {
const modal = document.getElementById('pageModal');
modal.classList.add('hidden');
}
// Close modal on Escape key
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape') {
closeModal();
}
});
</script>

View File

@@ -0,0 +1,39 @@
{{ $model := .model }}
{{ $date := .model.Datum.When }}
<div class="sticky top-4 bg-white border border-slate-200 rounded-lg p-4 mb-6 z-10">
<!-- Header with year link left, nav buttons right -->
<div class="flex items-center justify-between mb-3">
<a href="/jahrgang/{{- $date.Year -}}"
class="inline-flex items-center gap-1 text-blue-600 hover:text-blue-800 text-base font-medium">
<i class="ri-calendar-line"></i>
{{ $date.Year }}
</a>
<div class="flex flex-row gap-x-1">
{{ if $model.Prev }}
<a href="/{{- $model.Prev.Datum.When.Year -}}/{{- $model.Prev.Number.No -}}"
class="inline-flex items-center justify-center w-7 h-7 bg-slate-100 text-slate-700 rounded hover:bg-slate-200 transition-colors">
<i class="ri-arrow-left-line text-sm"></i>
</a>
{{ end }}
{{ if $model.Next }}
<a href="/{{- $model.Next.Datum.When.Year -}}/{{- $model.Next.Number.No -}}"
class="inline-flex items-center justify-center w-7 h-7 bg-slate-100 text-slate-700 rounded hover:bg-slate-200 transition-colors">
<i class="ri-arrow-right-line text-sm"></i>
</a>
{{ end }}
</div>
</div>
<!-- Issue title and date -->
<div class="border-t border-slate-200 pt-3">
<div class="flex items-center justify-between">
<div class="flex items-center gap-1">
<i class="ri-newspaper-line text-lg text-slate-600"></i>
<h1 class="text-lg font-semibold text-slate-800">{{ $date.Year }}&#8201;/&#8201;{{ $model.Number.No }}</h1>
</div>
<div class="text-base font-medium text-slate-700 bg-slate-100 px-2 py-1 rounded">{{ printf "%.2s" (WeekdayName $date.Weekday) }} {{ $date.Day }}.{{ $date.Month }}.</div>
</div>
</div>
</div>

View File

@@ -1,73 +1,76 @@
{{ $a := . }}
{{ if and $a (ne (len $a.Names) 0) }}
<div class="pb-4">
{{ index $a.Names 0 }}
<div>
{{ $gnd := GetGND $a.GND }}
{{ if (ne $gnd nil) }}
{{- if ne (len $gnd.DateOfBirth) 0 -}}
<i class="ri-asterisk text-xs relative bottom-0.5"></i>&nbsp;
{{- HRDateShort (index $gnd.DateOfBirth 0) -}}
{{ $gnd := GetGND $a.GND }}
{{ $works := LookupWorks $a }}
{{ $pieces := LookupPieces $a }}
<div>
<!-- Dictionary-style entry with hanging indent -->
<div class="pl-4" style="text-indent: -1rem;">
<!-- Name (bold), dates, links -->
<strong>
<a href="/akteure/{{ $a.ID }}" class="hover:text-blue-600 transition-colors">
{{ index $a.Names 0 }}
</a>
</strong>
{{ if ne $gnd nil }}
{{- if ne (len $gnd.DateOfBirth) 0 -}}
, {{ HRDateShort (index $gnd.DateOfBirth 0) }}
{{- end -}}
{{- if ne (len $gnd.DateOfDeath) 0 -}}
{{ HRDateShort (index $gnd.DateOfDeath 0) }}
{{- end -}}
{{- if ne (len $gnd.DateOfDeath) 0 }}
&emsp;<i class="ri-cross-fill text-xs relative bottom-0.5"></i
>&nbsp;{{ HRDateShort (index $gnd.DateOfDeath 0) }}
{{ end }}
{{- if ne (len $gnd.ProfessionOrOccupation) 0 -}}
<div>
{{- (index $gnd.ProfessionOrOccupation 0).Label -}}
{{- if gt (len $gnd.ProfessionOrOccupation) 1 -}}
,
{{ (index $gnd.ProfessionOrOccupation 1).Label -}}
{{ end -}}
{{- if gt (len $gnd.ProfessionOrOccupation) 2 -}}
,
{{ (index $gnd.ProfessionOrOccupation 2).Label -}}
{{ end -}}
</div>
{{ end }}
{{ end }}
<div class="flex gap-x-2 flex-row">
<a href="/akteure/{{ $a.ID }}" class="no-underline!"><i class="ri-links-line"></i></a>
{{- if ne $gnd nil -}}
<a href="{{ $a.GND }}" target="_blank">GND &rarr;</a>
{{- if ne (len $gnd.Wikipedia) 0 -}}
<a href="{{ (index $gnd.Wikipedia 0).Label }}" target="_blank">WIKI &rarr;</a>
{{ end -}}
{{ end }}
</div>
{{- if ne $gnd nil -}}
, <a href="{{ $a.GND }}" target="_blank" class="text-blue-600 hover:text-blue-800" title="Gemeinsame Normdatei">GND <i class="ri-external-link-line text-xs"></i></a>
{{- end -}}
</div>
<!-- Professions on second line -->
{{ if ne $gnd nil }}
{{- if ne (len $gnd.ProfessionOrOccupation) 0 -}}
<div class="text-gray-600">
{{ range $i, $prof := $gnd.ProfessionOrOccupation }}
{{ if lt $i 3 }}
{{ if gt $i 0 }}, {{ end }}{{ $prof.Label }}
{{ end }}
{{ end }}
</div>
{{- end -}}
{{ end }}
{{ $works := LookupWorks $a }}
{{- if ne (len $works) 0 -}}
<div>
<div class="mt-2">
<div>
<strong><i class="ri-book-line mr-1"></i>Werke</strong>
</div>
{{ range $_, $w := $works }}
{{- if ne (len $w.Item.Citation.InnerXML ) 0 -}}
<div>
{{- if ne (len $w.Item.Citation.InnerXML ) 0 -}}
<div class="italic">
<script type="application/xml" xslt-template="transform-citation" xslt-onload>
<xml>
{{- Safe $w.Item.Citation.InnerXML -}}
</xml>
</script>
{{- end -}}
{{ range $_, $url := $w.Item.URLs }}
<div>
<a href="{{ $url.Address }}" target="_blank">{{ $url.Chardata }}</a>
</div>
{{ end }}
{{ $pieces := LookupPieces $w.Item }}
{{ if len $pieces }}
<div>
{{ range $_, $p := $pieces }}
{{- range $_, $i := $p.Item.IssueRefs -}}
<div>
<a href="/{{ $i.When }}/{{ $i.Nr }}">{{ $i.Nr }}/{{ $i.When }}</a>
</div>
{{- end -}}
</div>
{{- end -}}
{{ range $_, $url := $w.Item.URLs }}
<div>
<a href="{{ $url.Address }}" target="_blank" class="text-blue-600 hover:text-blue-800">
{{ $url.Chardata }} <i class="ri-external-link-line text-xs"></i>
</a>
</div>
{{ end }}
</div>
{{ $workPieces := LookupPieces $w.Item }}
{{ if len $workPieces }}
<div class="flex flex-wrap gap-1 mt-1">
{{ range $_, $p := $workPieces }}
{{ range $_, $issue := $p.Item.IssueRefs }}
<a href="/{{ $issue.When }}/{{ $issue.Nr }}" class="inline-block bg-green-50 hover:bg-green-100 text-green-700 hover:text-green-800 px-2 py-1 rounded text-sm transition-colors">
{{ $issue.Nr }}/{{ $issue.When }}{{ if $issue.Von }} [S. {{ $issue.Von }}{{ if $issue.Bis }}-{{ $issue.Bis }}{{ end }}]{{ end }}
</a>
{{ end }}
{{ end }}
</div>
{{ end }}
@@ -76,17 +79,21 @@
{{ end }}
{{ $pieces := LookupPieces $a }}
{{- if ne (len $pieces) 0 -}}
<div>
{{ range $_, $p := $pieces }}
{{- range $_, $i := $p.Item.IssueRefs -}}
<div>
<a href="/{{ $i.When }}/{{ $i.Nr }}">{{ $i.Nr }}/{{ $i.When }}</a>
</div>
{{- end -}}
{{ end }}
{{ if ne (len $pieces) 0 }}
<div class="mt-2">
<div>
<strong><i class="ri-newspaper-line mr-1"></i>Beiträge</strong>
</div>
<div class="flex flex-wrap gap-1 mt-1">
{{ range $_, $p := $pieces }}
{{ range $_, $issue := $p.Item.IssueRefs }}
<a href="/{{ $issue.When }}/{{ $issue.Nr }}" class="inline-block bg-green-50 hover:bg-green-100 text-green-700 hover:text-green-800 px-2 py-1 rounded text-sm transition-colors">
{{ $issue.Nr }}/{{ $issue.When }}{{ if $issue.Von }} [S. {{ $issue.Von }}{{ if $issue.Bis }}-{{ $issue.Bis }}{{ end }}]{{ end }}
</a>
{{ end }}
{{ end }}
</div>
</div>
{{ end }}
</div>
{{ end }}