mirror of
				https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
				synced 2025-10-31 01:55:29 +00:00 
			
		
		
		
	Some improvements with the akteure page
This commit is contained in:
		| @@ -1,21 +1,22 @@ | ||||
| {{ if ne (len .model.Search) 1 }} | ||||
| 	{{ $agent := index $.model.Agents .model.Search }} | ||||
| 	{{ if not $agent }} | ||||
| 		<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="max-w-6xl mx-auto px-8 py-8"> | ||||
| 			<div class="bg-red-50 border border-red-200 rounded-lg p-6"> | ||||
| 				<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> | ||||
| 					<i class="ri-error-warning-line text-red-600 text-2xl mr-3"></i> | ||||
| 					<span class="text-red-800 text-lg">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"> | ||||
| 		<div class="max-w-full mx-auto px-8 py-8"> | ||||
| 			<div class="mb-8"> | ||||
| 				{{ $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 href="/akteure/{{ $letter }}" class="inline-flex items-center text-blue-600 | ||||
| 				hover:text-blue-800 transition-colors text-xl"> | ||||
| 					<i class="ri-arrow-left-line mr-3 text-xl"></i> | ||||
| 					{{ $letter }} | ||||
| 				</a> | ||||
| 			</div> | ||||
| 			<div>{{ template "_akteur" $agent }}</div> | ||||
| @@ -23,31 +24,71 @@ | ||||
| 	{{ end }} | ||||
|  | ||||
| {{ else }} | ||||
| 	<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 class="max-w-full mx-auto px-8 py-8"> | ||||
| 		<div class="mb-10"> | ||||
| 			<div class="bg-slate-100 px-6 py-4 rounded-lg mb-6"> | ||||
| 				{{ if eq .model.Search "autoren" }} | ||||
| 					<h1 class="text-4xl font-bold text-gray-900 mb-2">Autoren</h1> | ||||
| 					<p class="text-gray-700 text-lg">Personen, die Beiträge in der Zeitung verfasst haben</p> | ||||
| 				{{ else }} | ||||
| 					<h1 class="text-4xl font-bold text-gray-900 mb-2">Personen & Körperschaften</h1> | ||||
| 					<p class="text-gray-700 text-lg">Verzeichnis aller in der Zeitung erwähnten Personen und Institutionen</p> | ||||
| 				{{ end }} | ||||
| 			</div> | ||||
| 			<div class="flex items-center gap-4 mb-6"> | ||||
| 				<label class="inline-flex items-center"> | ||||
| 					<input type="checkbox" | ||||
| 					       class="form-checkbox h-5 w-5 text-blue-600 rounded" | ||||
| 					       {{ if eq .model.Search "autoren" }}checked{{ end }} | ||||
| 					       hx-get="{{ if eq .model.Search "autoren" }}/akteure/a{{ else }}/akteure/autoren{{ end }}" | ||||
| 					       hx-target="body" | ||||
| 					       hx-push-url="true"> | ||||
| 					<span class="ml-2 text-lg text-gray-700">Nur Autoren anzeigen</span> | ||||
| 				</label> | ||||
| 			</div> | ||||
| 		</div> | ||||
|  | ||||
| 		<!-- Alphabet Navigation --> | ||||
| 		<div class="mb-8 p-4 bg-gray-50 rounded-lg"> | ||||
| 			<div class="flex flex-wrap gap-2"> | ||||
| 		<div class="mb-10 p-6 bg-gray-50 rounded-lg"> | ||||
| 			<div class="flex flex-wrap gap-3"> | ||||
| 				{{ 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"> | ||||
| 					<a href="/akteure/{{ $l }}" class="inline-flex items-center justify-center w-10 h-10 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 text-lg"> | ||||
| 						{{ $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 }} | ||||
| 		<!-- Two Column Layout: Scrollspy + Content --> | ||||
| 		<div class="flex gap-8"> | ||||
| 			<!-- Scrollspy Navigation - Hidden on smaller screens, shown on 2xl+ --> | ||||
| 			<div class="hidden 2xl:block w-80 flex-shrink-0"> | ||||
| 				<div class="sticky top-8 h-screen"> | ||||
| 					<div class="bg-white border border-gray-200 rounded-lg p-4 h-full flex flex-col"> | ||||
| 						<h3 class="text-lg font-bold text-gray-900 mb-4">Auf dieser Seite</h3> | ||||
| 						<nav class="flex-1 overflow-y-auto" id="scrollspy-nav"> | ||||
| 							{{ range $_, $id := .model.Sorted }} | ||||
| 								{{ $a := index $.model.Agents $id }} | ||||
| 								<a href="#author-{{ $id }}" | ||||
| 								   class="block px-3 py-1 text-base text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded scrollspy-link transition-colors border-l-4 border-transparent" | ||||
| 								   data-target="author-{{ $id }}"> | ||||
| 									{{ index $a.Names 0 }} | ||||
| 								</a> | ||||
| 							{{ end }} | ||||
| 						</nav> | ||||
| 					</div> | ||||
| 				</div> | ||||
| 			{{ end }} | ||||
| 			</div> | ||||
|  | ||||
| 			<!-- People List - Main Content --> | ||||
| 			<div class="flex-1 space-y-6"> | ||||
| 				{{ range $_, $id := .model.Sorted }} | ||||
| 					{{ $a := index $.model.Agents $id }} | ||||
| 					<div id="author-{{ $id }}" class="bg-stone-100 rounded-lg p-6 border border-stone-200 scroll-mt-8 author-section"> | ||||
| 						{{ template "_akteur" $a }} | ||||
| 					</div> | ||||
| 				{{ end }} | ||||
| 			</div> | ||||
| 		</div> | ||||
| 	</div> | ||||
| {{ end }} | ||||
|   | ||||
| @@ -1,7 +1,14 @@ | ||||
| <title> | ||||
| 	KGPZ – | ||||
| 	{{ if ne (len .model.Search) 1 }} | ||||
| 		{{ index (index .model.Agents .model.Search).Names 0 }} | ||||
| 	{{ if eq .model.Search "autoren" }} | ||||
| 		Autoren | ||||
| 	{{ else if ne (len .model.Search) 1 }} | ||||
| 		{{ $agent := index .model.Agents .model.Search }} | ||||
| 		{{ if $agent }} | ||||
| 			{{ index $agent.Names 0 }} | ||||
| 		{{ else }} | ||||
| 			Person nicht gefunden | ||||
| 		{{ end }} | ||||
| 	{{ else }} | ||||
| 		Personen & Körperschaften: | ||||
| 		{{ Upper .model.Search }} | ||||
|   | ||||
							
								
								
									
										54
									
								
								views/routes/autoren/body.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								views/routes/autoren/body.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,54 @@ | ||||
| <div class="max-w-full mx-auto px-8 py-8"> | ||||
| 	<div class="mb-10"> | ||||
| 		<div class="bg-slate-100 px-6 py-4 rounded-lg mb-6"> | ||||
| 			<h1 class="text-4xl font-bold text-gray-900 mb-2">Autoren</h1> | ||||
| 			<p class="text-gray-700 text-lg">Personen, die Beiträge in der Zeitung verfasst haben</p> | ||||
| 		</div> | ||||
| 		<div class="flex items-center gap-4 mb-6"> | ||||
| 			<label class="inline-flex items-center"> | ||||
| 				<input type="checkbox" | ||||
| 				       class="form-checkbox h-5 w-5 text-blue-600 rounded" | ||||
| 				       checked | ||||
| 				       hx-get="/akteure/a" | ||||
| 				       hx-target="body" | ||||
| 				       hx-push-url="true"> | ||||
| 				<span class="ml-2 text-lg text-gray-700">Nur Autoren anzeigen</span> | ||||
| 			</label> | ||||
| 		</div> | ||||
| 	</div> | ||||
|  | ||||
|  | ||||
| 	<!-- Two Column Layout: Scrollspy + Content --> | ||||
| 	<div class="flex gap-8"> | ||||
| 		<!-- Scrollspy Navigation - Hidden on smaller screens, shown on 2xl+ --> | ||||
| 		<div class="hidden 2xl:block w-80 flex-shrink-0"> | ||||
| 			<div class="sticky top-8 h-screen"> | ||||
| 				<div class="bg-white border border-gray-200 rounded-lg p-4 h-full flex flex-col"> | ||||
| 					<h3 class="text-lg font-bold text-gray-900 mb-4">Auf dieser Seite</h3> | ||||
| 					<nav class="flex-1 overflow-y-auto" id="scrollspy-nav"> | ||||
| 						{{ range $_, $id := .model.Sorted }} | ||||
| 							{{ $a := index $.model.Agents $id }} | ||||
| 							<a href="#author-{{ $id }}" | ||||
| 							   class="block px-3 py-1 text-base text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded scrollspy-link transition-colors border-l-4 border-transparent" | ||||
| 							   data-target="author-{{ $id }}"> | ||||
| 								{{ index $a.Names 0 }} | ||||
| 							</a> | ||||
| 						{{ end }} | ||||
| 					</nav> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 		</div> | ||||
|  | ||||
| 		<!-- Authors List - Main Content --> | ||||
| 		<div class="flex-1 space-y-6"> | ||||
| 			{{ range $_, $id := .model.Sorted }} | ||||
| 				{{ $a := index $.model.Agents $id }} | ||||
| 				<div id="author-{{ $id }}" class="bg-stone-100 rounded-lg p-6 border border-stone-200 scroll-mt-8 author-section"> | ||||
| 					{{ template "_akteur_header" $a }} | ||||
| 					{{ template "_akteur_beitraege" $a }} | ||||
| 				</div> | ||||
| 			{{ end }} | ||||
| 		</div> | ||||
| 	</div> | ||||
| </div> | ||||
|  | ||||
							
								
								
									
										1
									
								
								views/routes/autoren/head.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								views/routes/autoren/head.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| <title>KGPZ – Autoren</title> | ||||
| @@ -1,144 +1,8 @@ | ||||
| {{ $a := . }} | ||||
| {{ if and $a (ne (len $a.Names) 0) }} | ||||
| 	{{ $gnd := GetGND $a.GND }} | ||||
| 	{{ $works := LookupWorks $a }} | ||||
| 	{{ $pieces := LookupPieces $a }} | ||||
| 	<div> | ||||
|  | ||||
| 		<!-- Name and external links --> | ||||
| 		<div class="flex items-start justify-between gap-4"> | ||||
| 			<div class="flex-1"> | ||||
| 				<!-- Large serif name - bold --> | ||||
| 				<div class="text-xl font-serif font-bold text-gray-900 leading-tight"> | ||||
| 					<a href="/akteure/{{ $a.ID }}" class="hover:text-blue-600 transition-colors"> | ||||
| 						{{ index $a.Names 0 }} | ||||
| 					</a> | ||||
| 				</div> | ||||
|  | ||||
| 				<!-- Years only below name --> | ||||
| 				{{ if ne $gnd nil }} | ||||
| 					{{- if or (ne (len $gnd.DateOfBirth) 0) (ne (len $gnd.DateOfDeath) 0) -}} | ||||
| 						<div class="text-gray-600 text-sm mt-1"> | ||||
| 							{{- if ne (len $gnd.DateOfBirth) 0 -}} | ||||
| 								{{ HRDateYear (index $gnd.DateOfBirth 0) }} | ||||
| 							{{- end -}} | ||||
| 							{{- if ne (len $gnd.DateOfDeath) 0 -}} | ||||
| 								–{{ HRDateYear (index $gnd.DateOfDeath 0) }} | ||||
| 							{{- end -}} | ||||
| 						</div> | ||||
| 					{{- end -}} | ||||
| 				{{ end }} | ||||
|  | ||||
| 				<!-- First three professions --> | ||||
| 				{{ if ne $gnd nil }} | ||||
| 					{{- if ne (len $gnd.ProfessionOrOccupation) 0 -}} | ||||
| 						<div class="text-gray-600 text-sm mt-1"> | ||||
| 							{{ range $i, $prof := $gnd.ProfessionOrOccupation }} | ||||
| 								{{ if lt $i 3 }} | ||||
| 									{{ if gt $i 0 }} · {{ end }}{{ $prof.Label }} | ||||
| 								{{ end }} | ||||
| 							{{ end }} | ||||
| 						</div> | ||||
| 					{{- end -}} | ||||
| 				{{ end }} | ||||
| 			</div> | ||||
|  | ||||
| 			<!-- External link symbols on the right --> | ||||
| 			<div class="flex gap-2 flex-shrink-0"> | ||||
| 				{{- if ne $gnd nil -}} | ||||
| 					{{- /* Wikipedia link if available */ -}} | ||||
| 					{{- if ne (len $gnd.Wikipedia) 0 -}} | ||||
| 						<a href="{{ (index $gnd.Wikipedia 0).ID }}" target="_blank" class="text-gray-500 hover:text-blue-600 transition-colors text-lg" title="Wikipedia"> | ||||
| 							<i class="ri-wikipedia-line"></i> | ||||
| 						</a> | ||||
| 					{{- end -}} | ||||
|  | ||||
| 					{{- /* GND link if available */ -}} | ||||
| 					{{- if ne $a.GND "" -}} | ||||
| 						<a href="{{ $a.GND }}" target="_blank" class="text-gray-500 hover:text-blue-600 transition-colors text-lg" title="Gemeinsame Normdatei"> | ||||
| 							<i class="ri-links-line"></i> | ||||
| 						</a> | ||||
| 					{{- else -}} | ||||
| 						{{- /* VIAF link if no GND available */ -}} | ||||
| 						{{- if ne (len $gnd.SameAs) 0 -}} | ||||
| 							{{ range $_, $ref := $gnd.SameAs }} | ||||
| 								{{- if ne $ref.ID "" -}} | ||||
| 									<a href="{{ $ref.ID }}" target="_blank" class="text-gray-500 hover:text-blue-600 transition-colors text-lg" title="External Link"> | ||||
| 										<i class="ri-global-line"></i> | ||||
| 									</a> | ||||
| 								{{- end -}} | ||||
| 							{{ end }} | ||||
| 						{{- end -}} | ||||
| 					{{- end -}} | ||||
| 				{{- end -}} | ||||
| 			</div> | ||||
| 		</div> | ||||
|  | ||||
| 		{{- if ne (len $works) 0 -}} | ||||
| 			<div class="mt-3"> | ||||
| 				<div class="text-sm font-medium text-gray-700 mb-2"> | ||||
| 					<i class="ri-book-line mr-1"></i>Werke | ||||
| 				</div> | ||||
| 				{{ range $_, $w := $works }} | ||||
| 					<div class="mb-2"> | ||||
| 						{{- if ne (len $w.Item.Citation.InnerXML ) 0 -}} | ||||
| 							<div class="text-sm"> | ||||
| 								<span class="italic"> | ||||
| 									<script type="application/xml" xslt-template="transform-citation" xslt-onload> | ||||
| 										<xml> | ||||
| 											{{- Safe $w.Item.Citation.InnerXML -}} | ||||
| 										</xml> | ||||
| 									</script> | ||||
| 								</span> | ||||
| 								{{- range $_, $url := $w.Item.URLs -}} | ||||
| 									<span class="ml-1"> | ||||
| 										<a href="{{ $url.Address }}" target="_blank" class="text-blue-600 hover:text-blue-800 text-sm"> | ||||
| 											{{ $url.Chardata }} <i class="ri-external-link-line text-xs"></i> | ||||
| 										</a> | ||||
| 									</span> | ||||
| 								{{- end -}} | ||||
| 							</div> | ||||
| 						{{- end -}} | ||||
| 						{{ $workPieces := LookupPieces $w.Item }} | ||||
| 						{{ if len $workPieces }} | ||||
| 							<div class="flex flex-wrap gap-1 mt-1"> | ||||
| 								{{ range $_, $p := $workPieces }} | ||||
| 									{{ range $_, $issue := $p.Item.IssueRefs }} | ||||
| 										<span class="inline-block bg-green-50 hover:bg-green-100 text-green-700 hover:text-green-800 px-2 py-1 rounded text-xs transition-colors"> | ||||
| 											{{ template "_citation" $issue }} | ||||
| 										</span> | ||||
| 									{{ end }} | ||||
| 								{{ end }} | ||||
| 							</div> | ||||
| 						{{ end }} | ||||
| 					</div> | ||||
| 				{{ end }} | ||||
| 			</div> | ||||
| 		{{ end }} | ||||
|  | ||||
| 		{{ $pieces := LookupPieces $a }} | ||||
| 		{{ if ne (len $pieces) 0 }} | ||||
| 			<div class="mt-3"> | ||||
| 				<div class="text-sm font-medium text-gray-700 mb-2"> | ||||
| 					<i class="ri-newspaper-line mr-1"></i>Beiträge | ||||
| 				</div> | ||||
| 				<div class="space-y-2"> | ||||
| 					{{ range $_, $p := SortPiecesByDate $pieces }} | ||||
| 						<div class="border-l-2 border-gray-200 pl-3"> | ||||
| 							<div class="text-sm"> | ||||
| 								{{ template "_piece_summary" $p.Item }} | ||||
| 							</div> | ||||
| 							<div class="mt-1 flex flex-wrap gap-1"> | ||||
| 								{{ range $_, $issue := $p.Item.IssueRefs }} | ||||
| 									<span class="inline-block bg-green-50 hover:bg-green-100 text-green-700 hover:text-green-800 px-2 py-1 rounded text-xs transition-colors"> | ||||
| 										{{ template "_citation" $issue }} | ||||
| 									</span> | ||||
| 								{{ end }} | ||||
| 							</div> | ||||
| 						</div> | ||||
| 					{{ end }} | ||||
| 				</div> | ||||
| 			</div> | ||||
| 		{{ end }} | ||||
| 		{{ template "_akteur_header" $a }} | ||||
| 		{{ template "_akteur_werke" $a }} | ||||
| 		{{ template "_akteur_beitraege" $a }} | ||||
| 	</div> | ||||
| {{ end }} | ||||
|   | ||||
							
								
								
									
										74
									
								
								views/routes/components/_akteur_beitraege.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										74
									
								
								views/routes/components/_akteur_beitraege.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,74 @@ | ||||
| {{ $a := . }} | ||||
| {{ $pieces := LookupPieces $a }} | ||||
| {{ if ne (len $pieces) 0 }} | ||||
| 	<div class="mt-8"> | ||||
| 		<div class="px-4 py-3 rounded-lg mb-4"> | ||||
| 			<h2 class="text-lg font-bold text-gray-900"> | ||||
| 				<i class="ri-newspaper-line mr-2"></i>Beiträge | ||||
| 			</h2> | ||||
| 		</div> | ||||
| 		<div class="space-y-2"> | ||||
| 			{{- /* Group pieces by title and work reference */ -}} | ||||
| 			{{- $groupedPieces := dict -}} | ||||
| 			{{- range $_, $p := SortPiecesByDate $pieces -}} | ||||
| 				{{- $groupKey := "" -}} | ||||
| 				{{- if $p.Item.Title -}} | ||||
| 					{{- $groupKey = index $p.Item.Title 0 -}} | ||||
| 				{{- else if $p.Item.WorkRefs -}} | ||||
| 					{{- $work := GetWork (index $p.Item.WorkRefs 0).Ref -}} | ||||
| 					{{- if $work.PreferredTitle -}} | ||||
| 						{{- $groupKey = $work.PreferredTitle -}} | ||||
| 					{{- else if $work.Citation.Title -}} | ||||
| 						{{- $groupKey = $work.Citation.Title -}} | ||||
| 					{{- end -}} | ||||
| 				{{- else if $p.Item.Incipit -}} | ||||
| 					{{- $groupKey = index $p.Item.Incipit 0 -}} | ||||
| 				{{- else -}} | ||||
| 					{{- $groupKey = printf "untitled-%s" $p.Item.ID -}} | ||||
| 				{{- end -}} | ||||
|  | ||||
| 				{{- $existing := index $groupedPieces $groupKey -}} | ||||
| 				{{- if $existing -}} | ||||
| 					{{- $groupedPieces = merge $groupedPieces (dict $groupKey (append $existing $p)) -}} | ||||
| 				{{- else -}} | ||||
| 					{{- $groupedPieces = merge $groupedPieces (dict $groupKey (slice $p)) -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
|  | ||||
|  | ||||
| 		<div class="columns-2 gap-6"> | ||||
| 			{{- /* Display grouped pieces */ -}} | ||||
| 			{{- range $groupKey, $groupedItems := $groupedPieces -}} | ||||
| 				<div class="border-l-2 border-gray-200 pl-4 break-inside-avoid"> | ||||
| 					<div class="text-lg"> | ||||
| 						{{- /* Use first piece for display text */ -}} | ||||
| 						{{ template "_piece_summary" (dict "Piece" (index $groupedItems 0).Item "CurrentActorID" $a.ID) }} | ||||
|  | ||||
| 						{{- /* Show all citations from all pieces in this group */ -}} | ||||
| 						{{- range $_, $groupItem := $groupedItems -}} | ||||
| 							{{- range $i, $issue := $groupItem.Item.IssueRefs -}} | ||||
| 								{{ $issueData := GetIssue (printf "%d-%d" $issue.When.Year $issue.Nr) }} | ||||
| 								{{- $url := printf "/%s/%d" $issue.When $issue.Nr -}} | ||||
| 								{{- if $issue.Von -}} | ||||
| 									{{- if $issue.Beilage -}} | ||||
| 										{{- $url = printf "%s#beilage-%d-page-%d" $url $issue.Beilage $issue.Von -}} | ||||
| 									{{- else -}} | ||||
| 										{{- $url = printf "%s/%d" $url $issue.Von -}} | ||||
| 									{{- end -}} | ||||
| 								{{- end -}} | ||||
| 								<a href="{{ $url }}" class="inline-block text-sm bg-green-50 text-green-700 hover:bg-green-100 hover:text-green-800 px-3 py-2 rounded ml-2 no-underline"> | ||||
| 									{{- if $issueData -}} | ||||
| 										{{ $issueData.Datum.When.Day }}.{{ $issueData.Datum.When.Month }}.{{ $issueData.Datum.When.Year }}/{{ $issue.Nr }}, S. {{ $issue.Von }}{{- if and $issue.Bis (ne $issue.Von $issue.Bis) }}-{{ $issue.Bis }}{{ end }} | ||||
| 									{{- else -}} | ||||
| 										{{ $issue.When.Day }}.{{ $issue.When.Month }}.{{ $issue.When.Year }}/{{ $issue.Nr }}, S. {{ $issue.Von }}{{- if and $issue.Bis (ne $issue.Von $issue.Bis) }}-{{ $issue.Bis }}{{ end }} | ||||
| 									{{- end -}} | ||||
| 								</a> | ||||
| 							{{- end -}} | ||||
| 						{{- end -}} | ||||
| 					</div> | ||||
| 				</div> | ||||
| 			{{- end -}} | ||||
| 			</div> | ||||
| 		</div> | ||||
| 	</div> | ||||
| {{ end }} | ||||
							
								
								
									
										73
									
								
								views/routes/components/_akteur_header.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								views/routes/components/_akteur_header.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,73 @@ | ||||
| {{ $a := . }} | ||||
| {{ if and $a (ne (len $a.Names) 0) }} | ||||
| 	{{ $gnd := GetGND $a.GND }} | ||||
|  | ||||
| 	<!-- Name and external links --> | ||||
| 	<div class="flex items-start justify-between gap-4"> | ||||
| 		<div class="flex-1"> | ||||
| 			<!-- Large serif name - bold --> | ||||
| 			<div class="text-2xl font-serif font-bold text-gray-900 leading-tight"> | ||||
| 				<a href="/akteure/{{ $a.ID }}" class="hover:text-blue-600 transition-colors"> | ||||
| 					{{ index $a.Names 0 }} | ||||
| 				</a> | ||||
| 			</div> | ||||
|  | ||||
| 			<!-- Years only below name --> | ||||
| 			{{ if ne $gnd nil }} | ||||
| 				{{- if or (ne (len $gnd.DateOfBirth) 0) (ne (len $gnd.DateOfDeath) 0) -}} | ||||
| 					<div class="text-gray-600 text-xl mt-2"> | ||||
| 						{{- if ne (len $gnd.DateOfBirth) 0 -}} | ||||
| 							{{ HRDateYear (index $gnd.DateOfBirth 0) }} | ||||
| 						{{- end -}} | ||||
| 						{{- if ne (len $gnd.DateOfDeath) 0 -}} | ||||
| 							–{{ HRDateYear (index $gnd.DateOfDeath 0) }} | ||||
| 						{{- end -}} | ||||
| 					</div> | ||||
| 				{{- end -}} | ||||
| 			{{ end }} | ||||
|  | ||||
| 			<!-- First three professions --> | ||||
| 			{{ if ne $gnd nil }} | ||||
| 				{{- if ne (len $gnd.ProfessionOrOccupation) 0 -}} | ||||
| 					<div class="text-gray-600 text-xl mt-2"> | ||||
| 						{{ range $i, $prof := $gnd.ProfessionOrOccupation }} | ||||
| 							{{ if lt $i 3 }} | ||||
| 								{{ if gt $i 0 }} · {{ end }}{{ $prof.Label }} | ||||
| 							{{ end }} | ||||
| 						{{ end }} | ||||
| 					</div> | ||||
| 				{{- end -}} | ||||
| 			{{ end }} | ||||
| 		</div> | ||||
|  | ||||
| 		<!-- External link symbols on the right --> | ||||
| 		<div class="flex gap-2 flex-shrink-0"> | ||||
| 			{{- if ne $gnd nil -}} | ||||
| 				{{- /* Wikipedia link if available */ -}} | ||||
| 				{{- if ne (len $gnd.Wikipedia) 0 -}} | ||||
| 					<a href="{{ (index $gnd.Wikipedia 0).ID }}" target="_blank" class="text-gray-500 hover:text-blue-600 transition-colors text-lg" title="Wikipedia"> | ||||
| 						<i class="ri-wikipedia-line"></i> | ||||
| 					</a> | ||||
| 				{{- end -}} | ||||
|  | ||||
| 				{{- /* GND link if available */ -}} | ||||
| 				{{- if ne $a.GND "" -}} | ||||
| 					<a href="{{ $a.GND }}" target="_blank" class="text-gray-500 hover:text-blue-600 transition-colors text-lg" title="Gemeinsame Normdatei"> | ||||
| 						<i class="ri-links-line"></i> | ||||
| 					</a> | ||||
| 				{{- else -}} | ||||
| 					{{- /* VIAF link if no GND available */ -}} | ||||
| 					{{- if ne (len $gnd.SameAs) 0 -}} | ||||
| 						{{ range $_, $ref := $gnd.SameAs }} | ||||
| 							{{- if ne $ref.ID "" -}} | ||||
| 								<a href="{{ $ref.ID }}" target="_blank" class="text-gray-500 hover:text-blue-600 transition-colors text-lg" title="External Link"> | ||||
| 									<i class="ri-global-line"></i> | ||||
| 								</a> | ||||
| 							{{- end -}} | ||||
| 						{{ end }} | ||||
| 					{{- end -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		</div> | ||||
| 	</div> | ||||
| {{ end }} | ||||
							
								
								
									
										188
									
								
								views/routes/components/_akteur_werke.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										188
									
								
								views/routes/components/_akteur_werke.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,188 @@ | ||||
| {{ $a := . }} | ||||
| {{ $works := LookupWorks $a }} | ||||
| {{- if ne (len $works) 0 -}} | ||||
| 	<div class="mt-8"> | ||||
| 		<div class="px-4 py-3 rounded-lg mb-4"> | ||||
| 			<h2 class="text-lg font-bold text-gray-900"> | ||||
| 				<i class="ri-book-line mr-2"></i>Werke | ||||
| 			</h2> | ||||
| 		</div> | ||||
| 		<div class="columns-2 gap-6"> | ||||
| 		{{ range $_, $w := $works }} | ||||
| 			<div class="mb-2 break-inside-avoid pl-4"> | ||||
| 				{{- if ne (len $w.Item.Citation.InnerXML ) 0 -}} | ||||
| 					<div class="text-lg"> | ||||
| 						<span class="italic"> | ||||
| 							<script type="application/xml" xslt-template="transform-citation" xslt-onload> | ||||
| 								<xml> | ||||
| 									{{- Safe $w.Item.Citation.InnerXML -}} | ||||
| 								</xml> | ||||
| 							</script> | ||||
| 						</span> | ||||
| 						{{- range $_, $url := $w.Item.URLs -}} | ||||
| 							<span class="ml-1"> | ||||
| 								<a href="{{ $url.Address }}" target="_blank" class="text-blue-600 hover:text-blue-800 text-sm"> | ||||
| 									{{ $url.Chardata }} <i class="ri-external-link-line text-xs"></i> | ||||
| 								</a> | ||||
| 							</span> | ||||
| 						{{- end -}} | ||||
| 					</div> | ||||
| 				{{- end -}} | ||||
| 				{{ $workPieces := LookupPieces $w.Item }} | ||||
| 				{{ if len $workPieces }} | ||||
| 					<div class="mt-1 text-lg"> | ||||
| 						{{- /* Group pieces by category and display inline */ -}} | ||||
| 						{{- $groupedByCategory := dict -}} | ||||
| 						{{- range $_, $p := $workPieces -}} | ||||
| 							{{- $categoryFlags := GetCategoryFlags $p.Item -}} | ||||
| 							{{- $categories := slice -}} | ||||
| 							{{- if $categoryFlags.Rezension -}} | ||||
| 								{{- $categories = append $categories "Rezension" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Gedicht -}} | ||||
| 								{{- $categories = append $categories "Gedicht" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Aufsatz -}} | ||||
| 								{{- $categories = append $categories "Aufsatz" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Theaterkritik -}} | ||||
| 								{{- $categories = append $categories "Theaterkritik" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Brief -}} | ||||
| 								{{- $categories = append $categories "Brief" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Erzaehlung -}} | ||||
| 								{{- $categories = append $categories "Erzählung" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Kommentar -}} | ||||
| 								{{- $categories = append $categories "Kommentar" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Uebersetzung -}} | ||||
| 								{{- $categories = append $categories "Übersetzung" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Auszug -}} | ||||
| 								{{- $categories = append $categories "Auszug" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Replik -}} | ||||
| 								{{- $categories = append $categories "Replik" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Lokalnachrichten -}} | ||||
| 								{{- $categories = append $categories "Lokalnachrichten" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Lotterie -}} | ||||
| 								{{- $categories = append $categories "Lotterie" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Nachruf -}} | ||||
| 								{{- $categories = append $categories "Nachruf" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Weltnachrichten -}} | ||||
| 								{{- $categories = append $categories "Weltnachrichten" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.EinkommendeFremde -}} | ||||
| 								{{- $categories = append $categories "Einkommende Fremde" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Wechselkurse -}} | ||||
| 								{{- $categories = append $categories "Wechselkurse" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Buecher -}} | ||||
| 								{{- $categories = append $categories "Bücher" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Lokalanzeigen -}} | ||||
| 								{{- $categories = append $categories "Lokalanzeigen" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Vorladung -}} | ||||
| 								{{- $categories = append $categories "Vorladung" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.GelehrteNachrichten -}} | ||||
| 								{{- $categories = append $categories "Gelehrte Nachrichten" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Anzeige -}} | ||||
| 								{{- $categories = append $categories "Anzeige" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Proklamation -}} | ||||
| 								{{- $categories = append $categories "Proklamation" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Desertionsliste -}} | ||||
| 								{{- $categories = append $categories "Desertionsliste" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Notenblatt -}} | ||||
| 								{{- $categories = append $categories "Notenblatt" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Vorlesungsverzeichnis -}} | ||||
| 								{{- $categories = append $categories "Vorlesungsverzeichnis" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Abbildung -}} | ||||
| 								{{- $categories = append $categories "Abbildung" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Ineigenersache -}} | ||||
| 								{{- $categories = append $categories "In eigener Sache" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if $categoryFlags.Provinienz -}} | ||||
| 								{{- $categories = append $categories "Provinienz" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- if eq (len $categories) 0 -}} | ||||
| 								{{- $categories = append $categories "Beitrag" -}} | ||||
| 							{{- end -}} | ||||
| 							{{- $categoryName := "" -}} | ||||
| 							{{- if eq (len $categories) 0 -}} | ||||
| 								{{- $categoryName = "Beitrag" -}} | ||||
| 							{{- else -}} | ||||
| 								{{- $sortedCategories := sortStrings $categories -}} | ||||
| 								{{- $categoryName = joinWithUnd $sortedCategories -}} | ||||
| 							{{- end -}} | ||||
|  | ||||
| 							{{- $existing := index $groupedByCategory $categoryName -}} | ||||
| 							{{- if $existing -}} | ||||
| 								{{- $groupedByCategory = merge $groupedByCategory (dict $categoryName (append $existing $p)) -}} | ||||
| 							{{- else -}} | ||||
| 								{{- $groupedByCategory = merge $groupedByCategory (dict $categoryName (slice $p)) -}} | ||||
| 							{{- end -}} | ||||
| 						{{- end -}} | ||||
|  | ||||
| 						{{- /* Display each category group */ -}} | ||||
| 						{{- range $categoryName, $categoryPieces := $groupedByCategory -}} | ||||
| 							<span class="inline-block text-sm bg-green-50 text-green-700 px-3 py-2 rounded ml-2"> | ||||
| 								{{ $categoryName }} | ||||
| 								{{- /* Check for additional authors (non-current actor) */ -}} | ||||
| 								{{- $additionalAuthorIDs := slice -}} | ||||
| 								{{- range $_, $p := $categoryPieces -}} | ||||
| 									{{- range $agentref := $p.Item.AgentRefs -}} | ||||
| 										{{- if and (or (eq $agentref.Category "") (eq $agentref.Category "autor")) (ne $agentref.Ref $a.ID) -}} | ||||
| 											{{- $additionalAuthorIDs = append $additionalAuthorIDs $agentref.Ref -}} | ||||
| 										{{- end -}} | ||||
| 									{{- end -}} | ||||
| 								{{- end -}} | ||||
| 								{{- $uniqueAuthorIDs := unique $additionalAuthorIDs -}} | ||||
| 								{{- if $uniqueAuthorIDs -}} | ||||
| 									{{ " " }}von {{ range $i, $authorID := $uniqueAuthorIDs }}{{- if gt $i 0 }} und {{ end }}{{- $agent := GetAgent $authorID -}}{{- if and $agent (gt (len $agent.Names) 0) -}}<a href="/akteure/{{ $authorID }}" class="text-green-700 hover:text-green-900 underline text-sm font-bold">{{ index $agent.Names 0 }}</a>{{- end -}}{{ end }} | ||||
| 								{{- end -}}{{ ":" }} | ||||
| 							</span> | ||||
| 							{{- /* Show all citations for this category */ -}} | ||||
| 							{{- range $_, $p := $categoryPieces -}} | ||||
| 								{{- range $_, $issue := $p.Item.IssueRefs -}} | ||||
| 									{{ $issueData := GetIssue (printf "%d-%d" $issue.When.Year $issue.Nr) }} | ||||
| 									{{- $url := printf "/%s/%d" $issue.When $issue.Nr -}} | ||||
| 									{{- if $issue.Von -}} | ||||
| 										{{- if $issue.Beilage -}} | ||||
| 											{{- $url = printf "%s#beilage-%d-page-%d" $url $issue.Beilage $issue.Von -}} | ||||
| 										{{- else -}} | ||||
| 											{{- $url = printf "%s/%d" $url $issue.Von -}} | ||||
| 										{{- end -}} | ||||
| 									{{- end -}} | ||||
| 									<a href="{{ $url }}" class="inline-block text-sm bg-blue-50 text-blue-700 hover:bg-blue-100 hover:text-blue-800 px-3 py-2 rounded ml-2 no-underline"> | ||||
| 										{{- if $issueData -}} | ||||
| 											{{ $issueData.Datum.When.Day }}.{{ $issueData.Datum.When.Month }}.{{ $issueData.Datum.When.Year }}/{{ $issue.Nr }}, S. {{ $issue.Von }}{{- if and $issue.Bis (ne $issue.Von $issue.Bis) }}-{{ $issue.Bis }}{{ end }} | ||||
| 										{{- else -}} | ||||
| 											{{ $issue.When.Day }}.{{ $issue.When.Month }}.{{ $issue.When.Year }}/{{ $issue.Nr }}, S. {{ $issue.Von }}{{- if and $issue.Bis (ne $issue.Von $issue.Bis) }}-{{ $issue.Bis }}{{ end }} | ||||
| 										{{- end -}} | ||||
| 									</a> | ||||
| 								{{- end -}} | ||||
| 							{{- end -}} | ||||
| 						{{- end -}} | ||||
| 					</div> | ||||
| 				{{ end }} | ||||
| 			</div> | ||||
| 		{{ end }} | ||||
| 		</div> | ||||
| 	</div> | ||||
| {{ end }} | ||||
| @@ -1,4 +1,5 @@ | ||||
| {{- $piece := . -}} | ||||
| {{- $piece := .Piece -}} | ||||
| {{- $currentActorID := .CurrentActorID -}} | ||||
|  | ||||
| <div class="leading-snug"> | ||||
| 	{{- $categoryFlags := GetCategoryFlags $piece -}} | ||||
| @@ -42,14 +43,113 @@ | ||||
| 		{{- end -}} | ||||
| 	{{- end -}} | ||||
|  | ||||
| 	{{- /* Generate piece descriptions */ -}} | ||||
| 	{{- /* Build category list */ -}} | ||||
| 	{{- $categories := slice -}} | ||||
| 	{{- if $categoryFlags.Rezension -}} | ||||
| 		{{- $categories = append $categories "Rezension" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Gedicht -}} | ||||
| 		{{- $categories = append $categories "Gedicht" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Aufsatz -}} | ||||
| 		{{- $categories = append $categories "Aufsatz" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Theaterkritik -}} | ||||
| 		{{- $categories = append $categories "Theaterkritik" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Brief -}} | ||||
| 		{{- $categories = append $categories "Brief" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Erzaehlung -}} | ||||
| 		{{- $categories = append $categories "Erzählung" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Kommentar -}} | ||||
| 		{{- $categories = append $categories "Kommentar" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Uebersetzung -}} | ||||
| 		{{- $categories = append $categories "Übersetzung" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Auszug -}} | ||||
| 		{{- $categories = append $categories "Auszug" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Replik -}} | ||||
| 		{{- $categories = append $categories "Replik" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Lokalnachrichten -}} | ||||
| 		{{- $categories = append $categories "Lokalnachrichten" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Lotterie -}} | ||||
| 		{{- $categories = append $categories "Lotterie" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Nachruf -}} | ||||
| 		{{- $categories = append $categories "Nachruf" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Weltnachrichten -}} | ||||
| 		{{- $categories = append $categories "Weltnachrichten" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.EinkommendeFremde -}} | ||||
| 		{{- $categories = append $categories "Einkommende Fremde" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Wechselkurse -}} | ||||
| 		{{- $categories = append $categories "Wechselkurse" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Buecher -}} | ||||
| 		{{- $categories = append $categories "Bücher" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Lokalanzeigen -}} | ||||
| 		{{- $categories = append $categories "Lokalanzeigen" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Vorladung -}} | ||||
| 		{{- $categories = append $categories "Vorladung" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.GelehrteNachrichten -}} | ||||
| 		{{- $categories = append $categories "Gelehrte Nachrichten" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Anzeige -}} | ||||
| 		{{- $categories = append $categories "Anzeige" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Proklamation -}} | ||||
| 		{{- $categories = append $categories "Proklamation" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Desertionsliste -}} | ||||
| 		{{- $categories = append $categories "Desertionsliste" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Notenblatt -}} | ||||
| 		{{- $categories = append $categories "Notenblatt" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Vorlesungsverzeichnis -}} | ||||
| 		{{- $categories = append $categories "Vorlesungsverzeichnis" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Abbildung -}} | ||||
| 		{{- $categories = append $categories "Abbildung" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Ineigenersache -}} | ||||
| 		{{- $categories = append $categories "In eigener Sache" -}} | ||||
| 	{{- end -}} | ||||
| 	{{- if $categoryFlags.Provinienz -}} | ||||
| 		{{- $categories = append $categories "Provinienz" -}} | ||||
| 	{{- end -}} | ||||
|  | ||||
| 	{{- /* Display category combination */ -}} | ||||
| 	{{- $categoryName := "" -}} | ||||
| 	{{- if eq (len $categories) 0 -}} | ||||
| 		{{- $categoryName = "Beitrag" -}} | ||||
| 	{{- else -}} | ||||
| 		{{- $sortedCategories := sortStrings $categories -}} | ||||
| 		{{- $categoryName = joinWithUnd $sortedCategories -}} | ||||
| 	{{- end -}} | ||||
|  | ||||
| 	{{- /* Generate piece descriptions */ -}} | ||||
| 	{{- if has $categories "Rezension" -}} | ||||
| 		{{- $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="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>, Rezension von: | ||||
| 					{{- if ne $agentref.Ref $currentActorID -}} | ||||
| 						<a href="/akteure/{{ $agentref.Ref }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>, | ||||
| 					{{- end -}} | ||||
| 					{{ $categoryName }} von: | ||||
| 					{{ if $workAuthorName }} | ||||
| 						<a href="/akteure/{{ $workAuthorID }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>, | ||||
| 					{{ end }} | ||||
| @@ -66,7 +166,7 @@ | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
| 		{{- if not $authorFound -}} | ||||
| 			Rezension von: | ||||
| 			{{ $categoryName }} von: | ||||
| 			{{ if $workAuthorName }} | ||||
| 				<a href="/akteure/{{ $workAuthorID }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>, | ||||
| 			{{ end }} | ||||
| @@ -79,104 +179,24 @@ | ||||
| 			{{ end }} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Gedicht -}} | ||||
| 		{{- $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="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>, Gedicht{{ if $title }}: <em>„{{ $title }}"</em>{{ end }} | ||||
| 					{{- $authorFound = true -}} | ||||
| 					{{- break -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
| 		{{- if not $authorFound -}} | ||||
| 			Gedicht{{ if $title }}: <em>„{{ $title }}"</em>{{ end }} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Aufsatz -}} | ||||
| 		{{- $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="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>, Aufsatz{{ if $title }}: <em>„{{ $title }}"</em>{{ end }} | ||||
| 					{{- $authorFound = true -}} | ||||
| 					{{- break -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
| 		{{- if not $authorFound -}} | ||||
| 			Aufsatz{{ if $title }}: <em>„{{ $title }}"</em>{{ end }} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Theaterkritik -}} | ||||
| 		{{- $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="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>{{ else if $title }} zu <em>{{ $title }}</em>{{ end }} | ||||
| 					{{- $authorFound = true -}} | ||||
| 					{{- break -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
| 		{{- if not $authorFound -}} | ||||
| 			Theaterkritik{{ if $workTitle }} zu <em>{{ $workTitle }}</em>{{ else if $title }} zu <em>{{ $title }}</em>{{ end }} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Brief -}} | ||||
| 		{{ if $categoryFlags.Nachruf }}Kondolenzbrief{{ else }}Leserbrief{{ end }} | ||||
| 		{{- 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="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a> | ||||
| 					{{- break -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Erzaehlung -}} | ||||
| 		{{- $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="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>, Erzählung{{ if $title }}: <em>„{{ $title }}"</em>{{ end }} | ||||
| 					{{- $authorFound = true -}} | ||||
| 					{{- break -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
| 		{{- if not $authorFound -}} | ||||
| 			Erzählung{{ if $title }}: <em>„{{ $title }}"</em>{{ end }} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Lokalnachrichten -}} | ||||
| 		{{ if $categoryFlags.Lotterie }}Lotterienachrichten{{ else if $categoryFlags.Nachruf }}Nachrufe{{ else if $categoryFlags.Theaterkritik }}Theaternachrichten{{ else }}Lokalnachrichten{{ end }} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Weltnachrichten -}} | ||||
| 		Politische Nachrichten aus aller Welt | ||||
|  | ||||
| 	{{- 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) -}} | ||||
| 					<a href="/akteure/{{ $agentref.Ref }}" class="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 ne $agentref.Ref $currentActorID -}} | ||||
| 						<a href="/akteure/{{ $agentref.Ref }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>, | ||||
| 					{{- end -}} | ||||
| 					{{ $categoryName }}{{ if $title }}: <em>„{{ $title }}"</em>{{ end }} | ||||
| 					{{- $authorFound = true -}} | ||||
| 					{{- break -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
| 		{{- if not $authorFound -}} | ||||
| 			{{ if $title }}<em>{{ $title }}</em>{{ else }}Beitrag ohne Titel{{ end }} | ||||
| 			{{ $categoryName }}{{ if $title }}: <em>„{{ $title }}"</em>{{ else if eq $categoryName "Beitrag" }} ohne Titel{{ end }} | ||||
| 		{{- end -}} | ||||
| 	{{- end -}} | ||||
|  | ||||
| 	{{- if $place }} <span class="inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md ml-1 whitespace-nowrap">{{ $place }}</span>{{ end }} | ||||
| </div> | ||||
		Reference in New Issue
	
	Block a user
	 Simon Martens
					Simon Martens