A lot sof small qualtiy of life upgrades

This commit is contained in:
Simon Martens
2025-09-16 17:02:58 +02:00
parent 3ebfcd410f
commit ca51a6317b
17 changed files with 2109 additions and 1407 deletions

View File

@@ -2,73 +2,78 @@
{{ if $model.Images.HasImages }}
<!-- Container with proper padding -->
<div class="px-4 lg:px-6 xl:px-8">
<div class="">
<!-- Three-column layout -->
<div class="flex flex-col lg:flex-row gap-6 w-full min-h-screen mt-8">
<div class="flex flex-col lg:flex-row gap-6 w-full min-h-screen">
<!-- Column 1: Sticky Inhaltsverzeichnis -->
<div class="lg:w-1/4 xl:w-1/5 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 class="lg:w-1/4 xl:w-1/5 flex-shrink-0 bg-slate-50 px-8 py-4">
<div class="lg:sticky lg:top-8 lg:overflow-y-auto">
<div class="bg-slate-50">
{{ template "_title_nav" . }}
</div>
<div class="">
{{ template "_inhaltsverzeichnis" . }}
</div>
</div>
</div>
<!-- Column 2: Newspaper pages -->
<div class="lg:w-3/5 xl:w-3/5 flex-1">
<div class="lg:w-3/5 xl:w-3/5 flex-1 py-4">
{{ template "_newspaper_layout" . }}
</div>
<!-- Column 3: Navigation buttons -->
<div class="w-16 lg:w-20 xl:w-24 flex-shrink-0">
<div class="w-16 lg:w-20 xl:w-24 flex-shrink-0 ">
<div class="lg:sticky lg:top-12 lg:max-h-[calc(100vh-2rem)]">
<div class="space-y-3 flex flex-col items-center px-2 pt-8">
<button
id="prevPageBtn"
onclick="scrollToPreviousPage()"
class="w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-gray-200 hover:bg-gray-300 text-gray-700 hover:text-gray-800 border border-gray-300 transition-colors duration-200 flex items-center justify-center cursor-pointer"
title="Vorherige Seite"
style="display: none;">
<i class="ri-arrow-up-line text-lg lg:text-xl"></i>
</button>
<button
id="prevPageBtn"
onclick="scrollToPreviousPage()"
class="w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-gray-200 hover:bg-gray-300 text-gray-700 hover:text-gray-800 border border-gray-300 transition-colors duration-200 flex items-center justify-center cursor-pointer"
title="Vorherige Seite"
style="display: none;">
<i class="ri-arrow-up-line text-lg lg:text-xl"></i>
</button>
<button
id="nextPageBtn"
onclick="scrollToNextPage()"
class="w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-gray-200 hover:bg-gray-300 text-gray-700 hover:text-gray-800 border border-gray-300 transition-colors duration-200 flex items-center justify-center cursor-pointer"
title="Nächste Seite">
<i class="ri-arrow-down-line text-lg lg:text-xl"></i>
</button>
<button
id="nextPageBtn"
onclick="scrollToNextPage()"
class="w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-gray-200 hover:bg-gray-300 text-gray-700 hover:text-gray-800 border border-gray-300 transition-colors duration-200 flex items-center justify-center cursor-pointer"
title="Nächste Seite">
<i class="ri-arrow-down-line text-lg lg:text-xl"></i>
</button>
{{ if $model.AdditionalPieces.Pages }}
<button
id="beilageBtn"
onclick="scrollToBeilage()"
class="w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-amber-100 hover:bg-amber-200 text-amber-700 hover:text-amber-800 border border-amber-300 transition-colors duration-200 flex items-center justify-center cursor-pointer"
title="Zu Beilage">
<i class="ri-attachment-line text-lg lg:text-xl"></i>
</button>
{{ end }}
{{ if $model.HasBeilageButton }}
<button
id="beilageBtn"
onclick="scrollToBeilage()"
class="w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-amber-100 hover:bg-amber-200 text-amber-700 hover:text-amber-800 border border-amber-300 transition-colors duration-200 flex items-center justify-center cursor-pointer"
title="Zu Beilage">
<i class="ri-attachment-line text-lg lg:text-xl"></i>
</button>
{{ end }}
<!-- Separator for utility buttons -->
<div class="w-full border-t border-gray-200 my-4"></div>
<!-- Share Link Button -->
<button
id="shareLinkBtn"
onclick="shareCurrentPage()"
class="w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-blue-100 hover:bg-blue-200 text-blue-700 hover:text-blue-800 border border-blue-300 transition-colors duration-200 flex items-center justify-center cursor-pointer"
title="Link zur aktuellen Seite teilen">
<i class="ri-share-line text-lg lg:text-xl"></i>
</button>
<!-- Separator for utility buttons -->
<div class="w-full border-t border-gray-200 my-4"></div>
<!-- Citation Button -->
<button
id="citationBtn"
onclick="generateCitation()"
class="w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-green-100 hover:bg-green-200 text-green-700 hover:text-green-800 border border-green-300 transition-colors duration-200 flex items-center justify-center cursor-pointer"
title="Zitation für diese Seite generieren">
<i class="ri-file-text-line text-lg lg:text-xl"></i>
</button>
<!-- Share Link Button -->
<button
id="shareLinkBtn"
onclick="shareCurrentPage()"
class="w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-blue-100 hover:bg-blue-200 text-blue-700 hover:text-blue-800 border border-blue-300 transition-colors duration-200 flex items-center justify-center cursor-pointer"
title="Link zur aktuellen Seite teilen">
<i class="ri-share-line text-lg lg:text-xl"></i>
</button>
<!-- Citation Button -->
<button
id="citationBtn"
onclick="generateCitation()"
class="w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-green-100 hover:bg-green-200 text-green-700 hover:text-green-800 border border-green-300 transition-colors duration-200 flex items-center justify-center cursor-pointer"
title="Zitation für diese Seite generieren">
<i class="ri-file-text-line text-lg lg:text-xl"></i>
</button>
</div>
</div>
</div>

View File

@@ -8,52 +8,65 @@
<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="mb-6 first:mb-0 pl-4 border-l-4 border-slate-300" data-page-container="{{ $page }}">
{{ range $page := $model.Pieces.Pages }}
{{ $pageItems := (index $model.Pieces.Items $page) }}
{{ $firstItem := index $pageItems 0 }}
<!-- Individual page entry -->
<div
class="mb-6 first:mb-0 pl-4 border-l-4 border-slate-300 page-entry"
data-page-container="{{ $page }}">
<div class="flex items-center justify-between gap-2 mb-2">
<div class="flex items-center gap-2">
{{ $allPages := $model.Pieces.Pages }}
{{ $firstPage := index $allPages 0 }}
{{ $lastPageIndex := sub (len $allPages) 1 }}
{{ $lastPage := index $allPages $lastPageIndex }}
{{ if eq $page $firstPage }}
<i class="ri-file-text-line text-black text-sm"></i>
{{ else if eq $page $lastPage }}
<i class="ri-file-text-line text-black text-sm" style="transform: scaleX(-1);"></i>
{{ else }}
{{ $isEvenPage := eq (mod $page 2) 0 }}
{{ if $isEvenPage }}
<i class="ri-file-text-line text-black text-sm" style="transform: scaleX(-1); margin-right: -8px;"></i><i class="ri-file-text-line text-slate-400 text-sm"></i>
{{ else }}
<i class="ri-file-text-line text-slate-400 text-sm" style="transform: scaleX(-1); margin-right: -8px;"></i><i class="ri-file-text-line text-black text-sm"></i>
{{ end }}
{{ end }}
{{ $pageItems := (index $model.Pieces.Items $page) }}
{{ $maxEndPage := $page }}
{{ range $groupedPiece := $pageItems }}{{ if gt $groupedPiece.EndPage $maxEndPage }}{{ $maxEndPage = $groupedPiece.EndPage }}{{ end }}{{ end }}
<a href="#page-{{ $page }}" class="page-number-inhalts font-bold text-slate-700 bg-blue-50 px-2 py-1 rounded text-sm transition-colors duration-200 hover:bg-blue-100 no-underline" data-page-number="{{ $page }}" data-end-page="{{ $maxEndPage }}" data-page-range="{{ $page }}-{{ $maxEndPage }}">{{ if ne $page $maxEndPage }}{{ $page }}-{{ $maxEndPage }}{{ else }}{{ $page }}{{ end }}</a>
<span class="icon-container">{{ PageIcon $firstItem.PageIcon }}</span>
<a
href="#page-{{ $page }}"
class="page-number-inhalts font-bold text-slate-700 bg-blue-50 px-2 py-1 rounded text-sm transition-colors duration-200 hover:bg-blue-100 no-underline"
data-page-number="{{ $page }}">
<span class="page-label">{{ $page }}</span>
</a>
</div>
<button class="page-permalink-btn text-slate-400 hover:text-blue-600 text-xs p-1 rounded hover:bg-blue-50 transition-colors duration-200"
title="Link zu dieser Seite kopieren"
onclick="copyPagePermalink('{{ $page }}', this)"
data-page="{{ $page }}">
<button
class="page-permalink-btn text-slate-400 hover:text-blue-600 text-xs p-1 rounded hover:bg-blue-50 transition-colors duration-200"
title="Link zu dieser Seite kopieren"
onclick="copyPagePermalink('{{ $page }}', this)"
data-page="{{ $page }}">
<i class="ri-link text-sm"></i>
</button>
</div>
<!-- Content area -->
<div class="space-y-0">
{{ range $groupedPiece := (index $model.Pieces.Items $page) }}
<div class="inhalts-entry py-1 px-0 bg-slate-50 rounded hover:bg-slate-100 transition-colors duration-200{{ if $groupedPiece.PieceByIssue.IsContinuation }} continuation-entry hidden{{ end }}" data-page="{{ $page }}"{{ if $groupedPiece.PieceByIssue.IsContinuation }} data-is-continuation="true"{{ end }}>
{{ template "_inhaltsverzeichnis_eintrag" $groupedPiece.PieceByIssue }}
{{ range $individualPiece := $pageItems }}
<div
class="inhalts-entry py-1 px-0 bg-slate-50 rounded hover:bg-slate-100 transition-colors duration-200 {{ if $individualPiece.PieceByIssue.IsContinuation }}
continuation-entry
{{ end }}"
data-page="{{ $page }}"
{{ if $individualPiece.PieceByIssue.IsContinuation }}
data-is-continuation="true"
{{ end }}
style="{{ if $individualPiece.PieceByIssue.IsContinuation }}
display: none;
{{ end }}">
{{ template "_inhaltsverzeichnis_eintrag" $individualPiece.PieceByIssue }}
<!-- Links zu anderen Teilen: -->
{{ if and (not $groupedPiece.PieceByIssue.IsContinuation) (gt (len $groupedPiece.IssueRefs) 1) }}
{{ if and (not $individualPiece.PieceByIssue.IsContinuation) (gt (len $individualPiece.IssueRefs) 1) }}
<div class="mt-1 pt-1 border-t border-slate-100">
<div class="flex items-center flex-wrap gap-1">
<i class="ri-links-line text-blue-500 text-sm mr-1"></i>
{{ range $issue := $groupedPiece.IssueRefs }}
{{ range $issue := $individualPiece.IssueRefs }}
<a
href="/{{- $issue.When -}}/{{- $issue.Nr -}}{{- if $issue.Von -}}{{- if $issue.Beilage -}}#beilage-{{ $issue.Beilage }}-page-{{ $issue.Von }}{{- else -}}#page-{{ $issue.Von }}{{- end -}}{{- end -}}"
href="/{{- $issue.When -}}/{{- $issue.Nr -}}{{- if $issue.Von -}}
{{- if $issue.Beilage -}}
#beilage-{{ $issue.Beilage }}-page-{{ $issue.Von }}
{{- else -}}
#page-{{ $issue.Von }}
{{- end -}}
{{- end -}}"
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)
@@ -61,18 +74,16 @@
aria-current="page"
{{ end }}>
<i class="ri-calendar-line text-xs"></i>
{{- $issue.When.Year }} Nr. {{ $issue.Nr -}}
{{- $issue.When.Year }} Nr.
{{ $issue.Nr -}}
</a>
{{ end }}
</div>
</div>
{{ end }}
</div>
</div>
{{ end }}
<!-- Pages end -->
</div>
</div>
</div>
{{- end -}}
</div>
@@ -86,52 +97,67 @@
<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="mb-6 first:mb-0 pl-4 border-l-4 border-amber-400" data-page-container="{{ $page }}" data-beilage="true">
{{ range $page := $model.AdditionalPieces.Pages }}
{{ $pageItems := (index $model.AdditionalPieces.Items $page) }}
{{ $firstItem := index $pageItems 0 }}
<!-- Individual beilage page entry -->
<div
class="mb-6 first:mb-0 pl-4 border-l-4 border-amber-400 page-entry"
data-page-container="{{ $page }}"
data-beilage="true">
<div class="flex items-center justify-between gap-2 mb-2">
<div class="flex items-center gap-2">
{{ $allBeilagePages := $model.AdditionalPieces.Pages }}
{{ $firstBeilagePage := index $allBeilagePages 0 }}
{{ $lastBeilagePageIndex := sub (len $allBeilagePages) 1 }}
{{ $lastBeilagePage := index $allBeilagePages $lastBeilagePageIndex }}
{{ if eq $page $firstBeilagePage }}
<i class="ri-file-text-line text-amber-600 text-sm"></i>
{{ else if eq $page $lastBeilagePage }}
<i class="ri-file-text-line text-amber-600 text-sm" style="transform: scaleX(-1);"></i>
{{ else }}
{{ $isEvenPage := eq (mod $page 2) 0 }}
{{ if $isEvenPage }}
<i class="ri-file-text-line text-amber-600 text-sm" style="transform: scaleX(-1); margin-right: -8px;"></i><i class="ri-file-text-line text-slate-400 text-sm"></i>
{{ else }}
<i class="ri-file-text-line text-slate-400 text-sm" style="transform: scaleX(-1); margin-right: -8px;"></i><i class="ri-file-text-line text-amber-600 text-sm"></i>
{{ end }}
{{ end }}
{{ $pageItems := (index $model.AdditionalPieces.Items $page) }}
{{ $maxEndPage := $page }}
{{ range $groupedPiece := $pageItems }}{{ if gt $groupedPiece.EndPage $maxEndPage }}{{ $maxEndPage = $groupedPiece.EndPage }}{{ end }}{{ end }}
<a href="#beilage-1-page-{{ $page }}" class="page-number-inhalts font-bold text-slate-700 bg-amber-50 px-2 py-1 rounded text-sm transition-colors duration-200 hover:bg-amber-100 no-underline" data-page-number="{{ $page }}" data-end-page="{{ $maxEndPage }}" data-page-range="{{ $page }}-{{ $maxEndPage }}">{{ if ne $page $maxEndPage }}{{ $page }}-{{ $maxEndPage }}{{ else }}{{ $page }}{{ end }}</a>
<span class="icon-container">{{ PageIcon $firstItem.PageIcon }}</span>
<a
href="#beilage-1-page-{{ $page }}"
class="page-number-inhalts font-bold text-slate-700 bg-amber-50 px-2 py-1 rounded text-sm transition-colors duration-200 hover:bg-amber-100 no-underline"
data-page-number="{{ $page }}">
<span class="page-label">{{ $page }}</span>
</a>
</div>
<button class="page-permalink-btn text-slate-400 hover:text-amber-600 text-xs p-1 rounded hover:bg-amber-50 transition-colors duration-200"
title="Link zu dieser Seite kopieren"
onclick="copyPagePermalink('{{ $page }}', this, true)"
data-page="{{ $page }}" data-beilage="true">
<button
class="page-permalink-btn text-slate-400 hover:text-amber-600 text-xs p-1 rounded hover:bg-amber-50 transition-colors duration-200"
title="Link zu dieser Seite kopieren"
onclick="copyPagePermalink('{{ $page }}', this, true)"
data-page="{{ $page }}"
data-beilage="true">
<i class="ri-link text-sm"></i>
</button>
</div>
<div class="space-y-1">
{{ range $groupedPiece := (index $model.AdditionalPieces.Items $page) }}
<div class="inhalts-entry py-2 px-0 bg-slate-50 rounded hover:bg-slate-100 transition-colors duration-200{{ if $groupedPiece.PieceByIssue.IsContinuation }} continuation-entry hidden{{ end }}" data-page="{{ $page }}"{{ if $groupedPiece.PieceByIssue.IsContinuation }} data-is-continuation="true"{{ end }}>
{{ template "_inhaltsverzeichnis_eintrag" $groupedPiece.PieceByIssue }}
<!-- Content area -->
<div class="space-y-0">
{{ range $individualPiece := $pageItems }}
<div
class="inhalts-entry py-1 px-0 bg-slate-50 rounded hover:bg-slate-100 transition-colors duration-200 {{ if $individualPiece.PieceByIssue.IsContinuation }}
continuation-entry
{{ end }}"
data-page="{{ $page }}"
{{ if $individualPiece.PieceByIssue.IsContinuation }}
data-is-continuation="true"
{{ end }}
style="{{ if $individualPiece.PieceByIssue.IsContinuation }}
display: none;
{{ end }}">
{{ template "_inhaltsverzeichnis_eintrag" $individualPiece.PieceByIssue }}
<!-- Links zu anderen Teilen: -->
{{ if and (not $groupedPiece.PieceByIssue.IsContinuation) (gt (len $groupedPiece.IssueRefs) 1) }}
{{ if and (not $individualPiece.PieceByIssue.IsContinuation) (gt (len $individualPiece.IssueRefs) 1) }}
<div class="mt-1 pt-1 border-t border-slate-100">
<div class="flex items-center flex-wrap gap-1">
<i class="ri-links-line text-blue-500 text-sm mr-1"></i>
{{ range $issue := $groupedPiece.IssueRefs }}
{{ range $issue := $individualPiece.IssueRefs }}
<a
href="/{{- $issue.When -}}/{{- $issue.Nr -}}{{- if $issue.Von -}}{{- if $issue.Beilage -}}#beilage-{{ $issue.Beilage }}-page-{{ $issue.Von }}{{- else -}}#page-{{ $issue.Von }}{{- end -}}{{- end -}}"
href="/{{- $issue.When -}}/{{- $issue.Nr -}}{{- if $issue.Von -}}
{{- if $issue.Beilage -}}
#beilage-{{ $issue.Beilage }}-page-{{ $issue.Von }}
{{- else -}}
#page-{{ $issue.Von }}
{{- end -}}
{{- end -}}"
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)
@@ -139,18 +165,16 @@
aria-current="page"
{{ end }}>
<i class="ri-calendar-line text-xs"></i>
{{- $issue.When.Year }} Nr. {{ $issue.Nr -}}
{{- $issue.When.Year }} Nr.
{{ $issue.Nr -}}
</a>
{{ end }}
</div>
</div>
{{ end }}
</div>
</div>
{{ end }}
<!-- Pages end -->
</div>
</div>
</div>
{{- end -}}
</div>

View File

@@ -1,292 +1,510 @@
{{- $piece := . -}}
{{- $fortsPrefix := "" -}}
{{- if $piece.IsContinuation -}}{{- $fortsPrefix = "<span class=\"italic text-gray-600\">(Forts.) </span>" -}}{{- end -}}
{{- 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 -}}
{{- $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 -}}
{{- 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 -}}
{{- end -}}
{{- $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 -}}
{{- 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 -}}
{{- /* 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 -}}
{{- $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 -}}
{{- end -}}
{{- /* Generate natural text descriptions */ -}}
{{- /* 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">{{ index $agent.Names 0 }}</a>{{ if $workTitle }}, Rezension: <em>{{ $workTitle }}</em>{{ if $workAuthorName }}{{ if $workAuthorID }} von <a href="/akteure/{{ $workAuthorID }}" class="author-link">{{ $workAuthorName }}</a>{{ else }} von {{ $workAuthorName }}{{ end }}{{ end }}{{ else if $title }}, Rezension: <em>{{ $title }}</em>{{ else }}, Rezension{{ end }}{{ if $place }} ({{ $place }}){{ end }}
{{- $authorFound = true -}}
{{- break -}}
{{- 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"
>{{ index $agent.Names 0 }}</a
>,
<span class="review-format"
>Rezension von:
{{ if $workAuthorName }}
{{- if $workAuthorID -}}
<a href="/akteure/{{ $workAuthorID }}" class="author-link">{{ $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 }}{{ if $place }}({{ $place }}){{ end }}</span
>
{{- $authorFound = true -}}
{{- break -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if not $authorFound -}}
{{ Safe $fortsPrefix }}Rezension{{ if $workTitle }}: <em>{{ $workTitle }}</em>{{ if $workAuthorName }}{{ if $workAuthorID }} von <a href="/akteure/{{ $workAuthorID }}" class="author-link">{{ $workAuthorName }}</a>{{ else }} von {{ $workAuthorName }}{{ end }}{{ end }}{{ else if $title }}: <em>{{ $title }}</em>{{ end }}{{ if $place }} ({{ $place }}){{ end }}
{{- end -}}
{{- if not $authorFound -}}
{{ Safe $fortsPrefix }}<span class="review-format"
>Rezension von:
{{ if $workAuthorName }}
{{- if $workAuthorID -}}
<a href="/akteure/{{ $workAuthorID }}" class="author-link">{{ $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 }}{{ if $place }}({{ $place }}){{ end }}</span
>
{{- end -}}
{{- else if $hasWeltnachrichten -}}
{{ Safe $fortsPrefix }}Politische Nachrichten aus aller Welt
{{- 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 }}für {{ $place }}{{ end }}
{{- 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 $hasWechselkurse -}}
Wechselkurse{{ if $place }} in {{ $place }}{{ end }}
{{- else if $hasBuecher -}}
Bücheranzeigen{{ if $title }}: <em>{{ $title }}</em>{{ end }}
{{- else if $hasBuecher -}}
Bücheranzeigen{{ if $title }}: <em>{{ $title }}</em>{{ end }}
{{- else if $hasLokalanzeigen -}}
{{ if $hasNachruf }}
Todesanzeige
{{ else }}
Lokalanzeige
{{ end }}
{{ if $place }}aus {{ $place }}{{ end }}{{ if $title }}: <em>{{ $title }}</em>{{ end }}
{{- else if $hasLokalanzeigen -}}
{{ if $hasNachruf }}Todesanzeige{{ else }}Lokalanzeige{{ end }}{{ if $place }} aus {{ $place }}{{ end }}{{ if $title }}: <em>{{ $title }}</em>{{ 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 $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 and $agent (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 }}: <em>„{{ $title }}"</em>{{ end }}
{{- $authorFound = true -}}
{{- break -}}
{{- 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) -}}
<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 }}: <em>„{{ $title }}"</em>{{ end }}
{{- $authorFound = true -}}
{{- break -}}
{{- end -}}
{{- 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 }}: <em>„{{ $title }}"</em>{{ 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 }}: <em>„{{ $title }}"</em>{{ end }}
{{- end -}}
{{- else if $hasVorladung -}}
Gerichtliche Vorladung{{ if $place }} in {{ $place }}{{ end }}{{ if $title }}: <em>{{ $title }}</em>{{ end }}
{{- else if $hasVorladung -}}
Gerichtliche
Vorladung{{ if $place }}in {{ $place }}{{ end }}{{ if $title }}: <em>{{ $title }}</em>{{ 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">{{ 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 -}}
{{- 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"
>{{ 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 -}}
{{- 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 -}}
{{- 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 }} aus {{ $place }}{{ end }}
{{- else if $hasGelehrteNachrichten -}}
{{ Safe $fortsPrefix }}{{ 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 and $agent (gt (len $agent.Names) 0) -}}
{{ Safe $fortsPrefix }}<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 -}}
{{- 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"
>{{ 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 -}}
{{- end -}}
{{- if not $authorFound -}}
{{ Safe $fortsPrefix }}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 -}}
{{- if not $authorFound -}}
{{ Safe $fortsPrefix }}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 -}}
{{ Safe $fortsPrefix }}Amtliche Proklamation{{ if $title }}: <em>{{ $title }}</em>{{ 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 $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">{{ index $agent.Names 0 }}</a>{{- $authorFound = true -}}{{- break -}}{{- end -}}{{- end -}}{{- end -}}{{ if $place }} aus {{ $place }}{{ 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">{{ index $agent.Names 0 }}</a
>{{- $authorFound = true -}}{{- break -}}
{{- end -}}
{{- else if $hasDesertionsliste -}}
{{ Safe $fortsPrefix }}Desertionsliste{{ if $place }} für {{ $place }}{{ end }}
{{- end -}}
{{- else if $hasNotenblatt -}}
{{ Safe $fortsPrefix }}{{ if $hasNachtrag }}Ergänztes {{ end }}Notenblatt{{ if $title }}: <em>{{ $title }}</em>{{ end }}
{{- end -}}
{{ if $place }}aus {{ $place }}{{ end }}
{{- else if $hasVorlesungsverzeichnis -}}
{{ Safe $fortsPrefix }}Vorlesungsverzeichnis{{ if $place }} der Universität {{ $place }}{{ end }}
{{- else if $hasDesertionsliste -}}
{{ Safe $fortsPrefix }}Desertionsliste{{ if $place }}für {{ $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 and $agent (gt (len $agent.Names) 0) -}}
{{ Safe $fortsPrefix }}<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 }}: <em>„{{ $title }}"</em>{{ end }}
{{- $authorFound = true -}}
{{- break -}}
{{- 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 }}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 and $agent (gt (len $agent.Names) 0) -}}
{{ Safe $fortsPrefix }}<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 }}: <em>„{{ $title }}"</em>{{ end }}
{{- $authorFound = true -}}
{{- break -}}
{{- end -}}
{{- 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 -}}
{{- 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 $hasAbbildung -}}
{{ Safe $fortsPrefix }}{{ if $hasAufsatz }}
Illustrierter Aufsatz
{{ else }}
Abbildung
{{ end }}
{{ if $title }}: <em>{{ $title }}</em>{{ end }}
{{- else if $hasKriminalanzeige -}}
{{ Safe $fortsPrefix }}Kriminalanzeige{{ if $place }} aus {{ $place }}{{ end }}
{{- else if $hasKriminalanzeige -}}
{{ Safe $fortsPrefix }}Kriminalanzeige{{ if $place }}aus {{ $place }}{{ end }}
{{- else if $hasKorrektur -}}
{{ Safe $fortsPrefix }}Korrektur{{ if $title }}: <em>{{ $title }}</em>{{ 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 $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 }}Auszug{{ if $title }}: <em>„{{ $title }}"</em>{{ end }}{{ if $workTitle }} aus <em>{{ $workTitle }}</em>{{ if $workAuthorName }} von <a href="/akteure/{{ $workAuthorID }}" class="author-link">{{ $workAuthorName }}</a>{{ end }}{{ end }}
{{- else if $hasAuszug -}}
{{ Safe $fortsPrefix }}Auszug{{ if $title }}: <em>„{{ $title }}"</em>{{ end }}
{{ if $workTitle }}
aus <em>{{ $workTitle }}</em>{{ if $workAuthorName }}
von <a href="/akteure/{{ $workAuthorID }}" class="author-link">{{ $workAuthorName }}</a>
{{ 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">{{ index $agent.Names 0 }}</a>{{ if $title }}: <em>{{ $title }}</em>{{ 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 }}
{{- 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"
>{{ index $agent.Names 0 }}</a
>{{ if $title }}: <em>{{ $title }}</em>{{ 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 -}}
{{- end -}}
{{- if not $authorFound -}}
{{ Safe $fortsPrefix }}{{ if $title }}<em>{{ $title }}</em>{{ 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 -}}
{{- if not $authorFound -}}
{{ Safe $fortsPrefix }}{{ if $title }}<em>{{ $title }}</em>{{ 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 -}}
{{- 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>
{{- range $annotation := $piece.AnnotationNote.Annotations -}}
<div class="italic text-sm mt-0.5 text-slate-600">
{{ $annotation.Inner.InnerXML }}
</div>
{{- end -}}
{{- end -}}
{{- end -}}

File diff suppressed because it is too large Load Diff

View File

@@ -1,39 +1,46 @@
{{ $model := .model }}
{{ $date := .model.Datum.When }}
<div class="sticky top-4 mb-12 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-black hover:text-slate-700 text-base font-medium">
<i class="ri-calendar-line"></i>
{{ $date.Year }}
</a>
<!-- 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-black hover:text-slate-700 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 }}
<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 no-underline font-bold">
<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>
{{ 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 no-underline font-bold">
<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>
<!-- Issue title and date -->
<div class="border-t border-slate-200 pt-3 mb-4">
<div class="flex items-center justify-between">
<div class="flex items-center gap-1">
<h1 class="text-lg font-semibold text-slate-800">
{{ $model.Number.No }}&#8201;/&#8201;{{ $date.Year }}
</h1>
</div>
<div class="text-base font-medium text-slate-700 bg-slate-100 px-2 py-1 rounded">
<span class="pr-1">{{ printf "%.2s" (WeekdayName $date.Weekday) }}</span>
<b>{{ $date.Day }}. {{ $date.MonthNameShort }}</b>
</div>
</div>
</div>