mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 17:15:31 +00:00
Page target navigation
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
{{- if $issue.Beilage -}}
|
||||
#beilage-{{ $issue.Beilage }}-page-{{ $issue.Von }}
|
||||
{{- else -}}
|
||||
#page-{{ $issue.Von }}
|
||||
/{{ $issue.Von }}
|
||||
{{- end -}}
|
||||
{{- end -}}"
|
||||
class="citation-link text-slate-700 no-underline hover:text-slate-900"
|
||||
@@ -45,7 +45,28 @@ function updateCitationLinks() {
|
||||
|
||||
citationLinks.forEach(link => {
|
||||
const citationUrl = link.getAttribute('data-citation-url');
|
||||
let isCurrentPage = false;
|
||||
|
||||
// Check for exact match
|
||||
if (citationUrl === currentPath) {
|
||||
isCurrentPage = true;
|
||||
} else {
|
||||
// Check if current path is an issue with page number that matches this citation
|
||||
const currentPathMatch = currentPath.match(/^\/(\d{4})\/(\d+)(?:\/(\d+))?$/);
|
||||
const citationUrlMatch = citationUrl.match(/^\/(\d{4})\/(\d+)$/);
|
||||
|
||||
if (currentPathMatch && citationUrlMatch) {
|
||||
const [, currentYear, currentIssue, currentPage] = currentPathMatch;
|
||||
const [, citationYear, citationIssue] = citationUrlMatch;
|
||||
|
||||
// If year and issue match, this citation refers to the current issue
|
||||
if (currentYear === citationYear && currentIssue === citationIssue) {
|
||||
isCurrentPage = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isCurrentPage) {
|
||||
// Style as current page: red text, no underline, not clickable
|
||||
link.classList.remove('text-slate-700', 'hover:text-slate-900');
|
||||
link.classList.add('text-red-700', 'pointer-events-none');
|
||||
|
||||
508
views/routes/components/_inhaltsverzeichnis_eintrag.gohtml
Normal file
508
views/routes/components/_inhaltsverzeichnis_eintrag.gohtml
Normal file
@@ -0,0 +1,508 @@
|
||||
{{- $piece := . -}}
|
||||
{{- $fortsPrefix := "" -}}
|
||||
{{- if $piece.IsContinuation -}}
|
||||
{{- $fortsPrefix = "<span class=\"italic text-gray-600\">(Forts.) </span>" -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
<div class="entry-description leading-snug mb-1">
|
||||
{{- $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 -}}
|
||||
|
||||
{{- 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 -}}
|
||||
|
||||
{{- $place := "" -}}
|
||||
{{- if $piece.PlaceRefs -}}
|
||||
{{- $placeObj := GetPlace (index $piece.PlaceRefs 0).Ref -}}
|
||||
{{- if gt (len $placeObj.Names) 0 -}}
|
||||
{{- $place = index $placeObj.Names 0 -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $title := "" -}}
|
||||
{{- if $piece.Title -}}
|
||||
{{- $title = index $piece.Title 0 -}}
|
||||
{{- else if $piece.Incipit -}}
|
||||
{{- $title = index $piece.Incipit 0 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $workTitle := "" -}}
|
||||
{{- $workTitleFull := "" -}}
|
||||
{{- $workAuthorName := "" -}}
|
||||
{{- $workAuthorID := "" -}}
|
||||
{{- if $piece.WorkRefs -}}
|
||||
{{- $work := GetWork (index $piece.WorkRefs 0).Ref -}}
|
||||
{{- /* Determine short title (PreferredTitle) and full title (Citation.Title) */ -}}
|
||||
{{- 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 -}}
|
||||
{{- /* Always get full title for highlighted state */ -}}
|
||||
{{- if $work.Citation.Title -}}
|
||||
{{- $workTitleFull = $work.Citation.Title -}}
|
||||
{{- else if $work.Citation.Chardata -}}
|
||||
{{- $workTitleFull = $work.Citation.Chardata -}}
|
||||
{{- else if $work.PreferredTitle -}}
|
||||
{{- $workTitleFull = $work.PreferredTitle -}}
|
||||
{{- 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 */ -}}
|
||||
|
||||
{{- if $hasRezension -}}
|
||||
{{- $authorFound := false -}}
|
||||
{{- range $agentref := $piece.AgentRefs -}}
|
||||
{{- if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) -}}
|
||||
{{- $agent := GetAgent $agentref.Ref -}}
|
||||
{{- if and $agent (gt (len $agent.Names) 0) -}}
|
||||
{{ Safe $fortsPrefix }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600"
|
||||
>{{ index $agent.Names 0 }}</a
|
||||
>,
|
||||
<span class="review-format"
|
||||
>Rezension von:
|
||||
{{ if $workAuthorName }}
|
||||
{{- if $workAuthorID -}}
|
||||
<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>
|
||||
{{- else -}}
|
||||
{{ $workAuthorName }}
|
||||
{{- end -}},
|
||||
{{ end }}
|
||||
{{ if $workTitle }}
|
||||
<em
|
||||
class="work-title"
|
||||
data-short-title="{{ $workTitle }}"
|
||||
{{ if $workTitleFull }}data-full-title="{{ $workTitleFull }}"{{ end }}
|
||||
>{{ $workTitle }}</em
|
||||
>
|
||||
{{ else if $title }}
|
||||
<em>{{ $title }}</em>
|
||||
{{ else }}
|
||||
[Werk unbekannt]
|
||||
{{ end }}</span
|
||||
>{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }}
|
||||
{{- $authorFound = true -}}
|
||||
{{- break -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if not $authorFound -}}
|
||||
{{ Safe $fortsPrefix }}<span class="review-format"
|
||||
>Rezension von:
|
||||
{{ if $workAuthorName }}
|
||||
{{- if $workAuthorID -}}
|
||||
<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>
|
||||
{{- else -}}
|
||||
{{ $workAuthorName }}
|
||||
{{- end -}},
|
||||
{{ end }}
|
||||
{{ if $workTitle }}
|
||||
<em
|
||||
class="work-title"
|
||||
data-short-title="{{ $workTitle }}"
|
||||
{{ if $workTitleFull }}data-full-title="{{ $workTitleFull }}"{{ end }}
|
||||
>{{ $workTitle }}</em
|
||||
>
|
||||
{{ else if $title }}
|
||||
<em>{{ $title }}</em>
|
||||
{{ else }}
|
||||
[Werk unbekannt]
|
||||
{{ end }}</span
|
||||
>{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- else if $hasWeltnachrichten -}}
|
||||
{{ Safe $fortsPrefix }}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 }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }}
|
||||
|
||||
{{- else if $hasWechselkurse -}}
|
||||
Wechselkurse{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }}
|
||||
|
||||
{{- else if $hasBuecher -}}
|
||||
Bücheranzeigen{{ if $title }}: <em>{{ $title }}</em>{{ end }}
|
||||
|
||||
{{- else if $hasLokalanzeigen -}}
|
||||
{{ if $hasNachruf }}
|
||||
Todesanzeige
|
||||
{{ else }}
|
||||
Lokalanzeige
|
||||
{{ end }}{{ if $title }}: <em>{{ $title }}</em>{{ end }}{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }}
|
||||
|
||||
{{- else if $hasLokalnachrichten -}}
|
||||
{{ if $hasLotterie }}
|
||||
Lotterienachrichten
|
||||
{{ else if $hasNachruf }}
|
||||
Nachrufe
|
||||
{{ else if $hasTheaterkritik }}
|
||||
Theaternachrichten
|
||||
{{ else if $hasPanegyrik }}
|
||||
Festlichkeiten
|
||||
{{ else }}
|
||||
Lokalnachrichten
|
||||
{{ end }}{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }}
|
||||
|
||||
{{- else if $hasGedicht -}}
|
||||
{{- $authorFound := false -}}
|
||||
{{- range $agentref := $piece.AgentRefs -}}
|
||||
{{- if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) -}}
|
||||
{{- $agent := GetAgent $agentref.Ref -}}
|
||||
{{- if and $agent (gt (len $agent.Names) 0) -}}
|
||||
{{ Safe $fortsPrefix }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ 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 }}: <em>„{{ $title }}"</em>{{ end }}
|
||||
{{- $authorFound = true -}}
|
||||
{{- break -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if not $authorFound -}}
|
||||
{{ Safe $fortsPrefix }}{{ if $hasKommentar }}
|
||||
Gedicht mit Kommentar
|
||||
{{ else if $hasUebersetzung }}
|
||||
Gedichtübersetzung
|
||||
{{ else if $hasGelehrteNachrichten }}
|
||||
Gedicht zu gelehrten Angelegenheiten
|
||||
{{ else }}
|
||||
Gedicht
|
||||
{{ end }}{{ if $title }}: <em>„{{ $title }}"</em>{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- else if $hasVorladung -}}
|
||||
Gerichtliche Vorladung{{ if $title }}: <em>{{ $title }}</em>{{ end }}{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }}
|
||||
|
||||
{{- else if $hasAufsatz -}}
|
||||
{{- $authorFound := false -}}
|
||||
{{- range $agentref := $piece.AgentRefs -}}
|
||||
{{- if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) -}}
|
||||
{{- $agent := GetAgent $agentref.Ref -}}
|
||||
{{- if and $agent (gt (len $agent.Names) 0) -}}
|
||||
{{ Safe $fortsPrefix }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600"
|
||||
>{{ 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 }}: <em>„{{ $title }}"</em>{{ end }}
|
||||
{{- $authorFound = true -}}
|
||||
{{- break -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if not $authorFound -}}
|
||||
{{ Safe $fortsPrefix }}{{ 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 }}: <em>„{{ $title }}"</em>{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- else if $hasGelehrteNachrichten -}}
|
||||
{{ Safe $fortsPrefix }}{{ if $hasTheaterkritik }}
|
||||
Theaterkritik
|
||||
{{ else if $hasKommentar }}
|
||||
Gelehrter Kommentar
|
||||
{{ else }}
|
||||
Gelehrte Nachrichten
|
||||
{{ end }}{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }}
|
||||
|
||||
{{- else if $hasTheaterkritik -}}
|
||||
{{- $authorFound := false -}}
|
||||
{{- range $agentref := $piece.AgentRefs -}}
|
||||
{{- if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) -}}
|
||||
{{- $agent := GetAgent $agentref.Ref -}}
|
||||
{{- if and $agent (gt (len $agent.Names) 0) -}}
|
||||
{{ Safe $fortsPrefix }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600"
|
||||
>{{ index $agent.Names 0 }}</a
|
||||
>,
|
||||
Theaterkritik{{ if $workTitle }}
|
||||
zu <em>{{ $workTitle }}</em>{{ if $workAuthorName }}
|
||||
von
|
||||
<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>
|
||||
{{ end }}
|
||||
{{ else if $title }}
|
||||
zu <em>{{ $title }}</em>
|
||||
{{ end }}{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }}
|
||||
{{- $authorFound = true -}}
|
||||
{{- break -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if not $authorFound -}}
|
||||
{{ Safe $fortsPrefix }}Theaterkritik{{ if $workTitle }}
|
||||
zu <em>{{ $workTitle }}</em>{{ if $workAuthorName }}
|
||||
von <a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>
|
||||
{{ end }}
|
||||
{{ else if $title }}
|
||||
zu <em>{{ $title }}</em>
|
||||
{{ end }}{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- else if $hasProklamation -}}
|
||||
{{ Safe $fortsPrefix }}Amtliche
|
||||
Proklamation{{ if $title }}: <em>{{ $title }}</em>{{ end }}
|
||||
|
||||
{{- else if $hasIneigenersache -}}
|
||||
{{ Safe $fortsPrefix }}{{ if $hasKommentar }}
|
||||
{{ if $hasNachtrag }}Ergänzender Kommentar{{ else }}Redaktioneller Kommentar{{ end }}
|
||||
{{ else if $hasReplik }}
|
||||
Redaktionelle Stellungnahme
|
||||
{{ else }}
|
||||
Anmerkung der Redaktion
|
||||
{{ end }}
|
||||
{{ if $title }}: <em>{{ $title }}</em>{{ end }}
|
||||
|
||||
{{- else if $hasBrief -}}
|
||||
{{ Safe $fortsPrefix }}{{ 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 and $agent (gt (len $agent.Names) 0) -}}
|
||||
von
|
||||
<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a
|
||||
>{{- $authorFound = true -}}{{- break -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- end -}}
|
||||
|
||||
{{- end -}}{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }}
|
||||
|
||||
{{- else if $hasDesertionsliste -}}
|
||||
{{ Safe $fortsPrefix }}Desertionsliste{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }}
|
||||
|
||||
{{- else if $hasNotenblatt -}}
|
||||
{{ Safe $fortsPrefix }}{{ if $hasNachtrag }}Ergänztes{{ end }}Notenblatt{{ if $title }}
|
||||
: <em>{{ $title }}</em>
|
||||
{{ end }}
|
||||
|
||||
{{- else if $hasVorlesungsverzeichnis -}}
|
||||
{{ Safe $fortsPrefix }}Vorlesungsverzeichnis{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }}
|
||||
|
||||
{{- else if $hasErzaehlung -}}
|
||||
{{- $authorFound := false -}}
|
||||
{{- range $agentref := $piece.AgentRefs -}}
|
||||
{{- if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) -}}
|
||||
{{- $agent := GetAgent $agentref.Ref -}}
|
||||
{{- if and $agent (gt (len $agent.Names) 0) -}}
|
||||
{{ Safe $fortsPrefix }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600"
|
||||
>{{ index $agent.Names 0 }}</a
|
||||
>,
|
||||
{{ if $hasUebersetzung }}
|
||||
Übersetzung einer Erzählung
|
||||
{{ else }}
|
||||
Erzählung
|
||||
{{ end }}{{ if $title }}: <em>„{{ $title }}"</em>{{ end }}
|
||||
{{- $authorFound = true -}}
|
||||
{{- break -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if not $authorFound -}}
|
||||
{{ Safe $fortsPrefix }}{{ if $hasUebersetzung }}
|
||||
Übersetzung einer Erzählung
|
||||
{{ else }}
|
||||
Erzählung
|
||||
{{ end }}{{ if $title }}: <em>„{{ $title }}"</em>{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- else if $hasAbbildung -}}
|
||||
{{ Safe $fortsPrefix }}{{ if $hasAufsatz }}
|
||||
Illustrierter Aufsatz
|
||||
{{ else }}
|
||||
Abbildung
|
||||
{{ end }}
|
||||
{{ if $title }}: <em>{{ $title }}</em>{{ end }}
|
||||
|
||||
{{- else if $hasKriminalanzeige -}}
|
||||
{{ Safe $fortsPrefix }}Kriminalanzeige{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }}
|
||||
|
||||
{{- else if $hasKorrektur -}}
|
||||
{{ Safe $fortsPrefix }}Korrektur{{ if $title }}: <em>{{ $title }}</em>{{ end }}
|
||||
|
||||
{{- else if $hasAnzeige -}}
|
||||
{{ Safe $fortsPrefix }}{{ if $hasAuszug }}
|
||||
{{ if $hasGedicht }}Gedichtauszug{{ else }}Textauszug{{ end }}
|
||||
{{ else }}
|
||||
Anzeige
|
||||
{{ end }}
|
||||
{{ if $title }}: <em>{{ $title }}</em>{{ end }}
|
||||
|
||||
{{- else if $hasAuszug -}}
|
||||
{{ Safe $fortsPrefix }}{{ if $title }}<em>{{ $title }}</em>, {{ end }}{{ if $hasUebersetzung }}Übersetzung aus:{{ else }}Auszug aus:{{ end }} {{ if $workAuthorName }}
|
||||
<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>, {{ end }}{{ if $workTitle }}<em
|
||||
class="work-title"
|
||||
data-short-title="{{ $workTitle }}"
|
||||
{{ if $workTitleFull }}data-full-title="{{ $workTitleFull }}"{{ end }}
|
||||
>{{ $workTitle }}</em>{{ else if $title }}<em>{{ $title }}</em>{{ else }}[Werk unbekannt]{{ end }}
|
||||
|
||||
{{- else -}}
|
||||
{{- $authorFound := false -}}
|
||||
{{- range $agentref := $piece.AgentRefs -}}
|
||||
{{- if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) -}}
|
||||
{{- $agent := GetAgent $agentref.Ref -}}
|
||||
{{- if and $agent (gt (len $agent.Names) 0) -}}
|
||||
{{ Safe $fortsPrefix }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600"
|
||||
>{{ index $agent.Names 0 }}</a
|
||||
>{{ if $title }}: <em>{{ $title }}</em>{{ end }}{{ if $workTitle }}
|
||||
{{ if $title }}, {{ if $hasUebersetzung }}Übersetzung aus:{{ else }}Auszug aus:{{ end }} {{ end }}{{ if $workAuthorName }}
|
||||
<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>, {{ end }}<em
|
||||
class="work-title"
|
||||
data-short-title="{{ $workTitle }}"
|
||||
{{ if $workTitleFull }}data-full-title="{{ $workTitleFull }}"{{ end }}
|
||||
>{{ $workTitle }}</em>
|
||||
{{ end }}
|
||||
{{- $authorFound = true -}}
|
||||
{{- break -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if not $authorFound -}}
|
||||
{{ Safe $fortsPrefix }}{{ if $title }}<em>{{ $title }}</em>{{ end }}{{ if $workTitle }}
|
||||
{{ if $title }}, {{ if $hasUebersetzung }}Übersetzung aus:{{ else }}Auszug aus:{{ end }} {{ end }}{{ if $workAuthorName }}
|
||||
<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>, {{ end }}<em
|
||||
class="work-title"
|
||||
data-short-title="{{ $workTitle }}"
|
||||
{{ if $workTitleFull }}data-full-title="{{ $workTitleFull }}"{{ end }}
|
||||
>{{ $workTitle }}</em>
|
||||
{{ else if not $title }}
|
||||
Beitrag ohne Titel
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
{{- if not $piece.IsContinuation -}}
|
||||
{{- range $annotation := $piece.AnnotationNote.Annotations -}}
|
||||
<div class="italic text-sm mt-0.5 text-slate-600">
|
||||
{{ $annotation.Inner.InnerXML }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
33
views/routes/components/_page_jump_form_error.gohtml
Normal file
33
views/routes/components/_page_jump_form_error.gohtml
Normal file
@@ -0,0 +1,33 @@
|
||||
<form hx-post="/jump" hx-swap="outerHTML" class="space-y-4">
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<!-- Year Selection -->
|
||||
<div>
|
||||
<label for="jump-year" class="block text-sm font-medium text-slate-700 mb-1">Jahr</label>
|
||||
<select id="jump-year" name="year" class="w-full px-3 py-2 border {{ if .YearError }}border-red-300{{ else }}border-slate-300{{ end }} rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
||||
{{ range $year := .AvailableYears }}
|
||||
<option value="{{ $year }}" {{ if eq $year $.CurrentYear }}selected{{ end }}>{{ $year }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
{{ if .YearError }}
|
||||
<div class="text-red-600 text-sm mt-1">{{ .YearError }}</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<!-- Page Input -->
|
||||
<div>
|
||||
<label for="jump-page" class="block text-sm font-medium text-slate-700 mb-1">Seite</label>
|
||||
<input type="number" id="jump-page" name="page" min="1" placeholder="z.B. 42" value="{{ .PageValue }}" class="w-full px-3 py-2 border {{ if .PageError }}border-red-300{{ else }}border-slate-300{{ end }} rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
||||
{{ if .PageError }}
|
||||
<div class="text-red-600 text-sm mt-1">{{ .PageError }}</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Submit Button -->
|
||||
<div class="text-center">
|
||||
<button type="submit" class="inline-flex items-center px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md shadow-sm transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
|
||||
<i class="ri-arrow-right-line mr-2"></i>
|
||||
Zur Seite springen
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
17
views/routes/components/_page_link_indicator.gohtml
Normal file
17
views/routes/components/_page_link_indicator.gohtml
Normal file
@@ -0,0 +1,17 @@
|
||||
{{- /*
|
||||
Red dot indicator for directly linked pages
|
||||
Usage: {{ template "_page_link_indicator" (dict "pageNumber" $page "targetPage" $targetPage) }}
|
||||
|
||||
Parameters:
|
||||
- pageNumber (int): The page number being displayed
|
||||
- targetPage (int): The target page from URL (0 if none)
|
||||
|
||||
Shows a red dot with tooltip when pageNumber matches targetPage
|
||||
*/ -}}
|
||||
|
||||
{{ $pageNumber := .pageNumber }}
|
||||
{{ $targetPage := .targetPage }}
|
||||
|
||||
{{ if and $targetPage (eq $pageNumber $targetPage) }}
|
||||
<span class="absolute -top-1 -right-1 w-3 h-3 bg-red-500 rounded-full z-10" title="verlinkte Seite"></span>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user