mirror of
				https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
				synced 2025-10-29 17:15:31 +00:00 
			
		
		
		
	Refined orte
This commit is contained in:
		| @@ -11,7 +11,7 @@ | ||||
| 				<!-- Year Selection --> | ||||
| 				<div class="flex items-center gap-2 mb-4"> | ||||
| 					<label for="year-select" class="text-sm text-slate-600 w-12 hidden">Jahr wählen...</label> | ||||
| 					<select id="year-select" class="tabular-nums flex-1 px-2 py-1 border border-slate-300 rounded text-sm bg-white focus:outline-none focus:ring-1 focus:ring-blue-400 focus:border-blue-400" style="max-height: 200px; overflow-y: auto;"> | ||||
| 					<select id="year-select" autocomplete="off" class="tabular-nums flex-1 px-2 py-1 border border-slate-300 rounded text-sm bg-white focus:outline-none focus:ring-1 focus:ring-blue-400 focus:border-blue-400" style="max-height: 200px; overflow-y: auto;"> | ||||
| 						<option value="">Jahr wählen</option> | ||||
| 						{{ range $year := .AvailableYears }} | ||||
| 							<option value="{{ $year }}">{{ $year }}</option> | ||||
| @@ -21,10 +21,10 @@ | ||||
|  | ||||
| 				<!-- Ausgabe Selection - Two Selects --> | ||||
| 				<div class="flex items-center gap-2"> | ||||
| 					<select id="issue-number-select" disabled class="flex-1 px-2 py-1 border border-slate-300 rounded text-sm bg-white focus:outline-none focus:ring-1 focus:ring-blue-400 focus:border-blue-400 disabled:bg-slate-100 disabled:cursor-not-allowed"> | ||||
| 					<select id="issue-number-select" disabled autocomplete="off" class="flex-1 px-2 py-1 border border-slate-300 rounded text-sm bg-white focus:outline-none focus:ring-1 focus:ring-blue-400 focus:border-blue-400 disabled:bg-slate-100 disabled:cursor-not-allowed"> | ||||
| 						<option value="">Nr.</option> | ||||
| 					</select> | ||||
| 					<select id="issue-date-select" disabled class="flex-1 px-2 py-1 border border-slate-300 rounded text-sm bg-white focus:outline-none focus:ring-1 focus:ring-blue-400 focus:border-blue-400 disabled:bg-slate-100 disabled:cursor-not-allowed"> | ||||
| 					<select id="issue-date-select" disabled autocomplete="off" class="flex-1 px-2 py-1 border border-slate-300 rounded text-sm bg-white focus:outline-none focus:ring-1 focus:ring-blue-400 focus:border-blue-400 disabled:bg-slate-100 disabled:cursor-not-allowed"> | ||||
| 						<option value="">Datum</option> | ||||
| 					</select> | ||||
| 				</div> | ||||
| @@ -39,7 +39,7 @@ | ||||
| 				<!-- Page Input --> | ||||
| 				<div class="flex items-center gap-2"> | ||||
| 					<label for="page-input" class="text-sm text-slate-600 w-12 hidden"> oder Seite eingeben...</label> | ||||
| 					<input type="number" id="page-input" min="1" placeholder="Seite eingeben" disabled class="flex-1 px-2 py-1 border border-slate-300 rounded text-sm bg-white focus:outline-none focus:ring-1 focus:ring-blue-400 focus:border-blue-400 disabled:bg-slate-100 disabled:cursor-not-allowed disabled:text-slate-500"> | ||||
| 					<input type="number" id="page-input" min="1" placeholder="Seite eingeben" disabled autocomplete="off" class="flex-1 px-2 py-1 border border-slate-300 rounded text-sm bg-white focus:outline-none focus:ring-1 focus:ring-blue-400 focus:border-blue-400 disabled:bg-slate-100 disabled:cursor-not-allowed disabled:text-slate-500"> | ||||
| 				</div> | ||||
|  | ||||
| 				<!-- Page Jump Button --> | ||||
| @@ -75,6 +75,7 @@ | ||||
| 						type="text" | ||||
| 						id="person-search" | ||||
| 						placeholder="Name oder Lebensdaten eingeben..." | ||||
| 						autocomplete="off" | ||||
| 						class="flex-1 px-2 py-1 border border-slate-300 rounded text-sm bg-white focus:outline-none focus:ring-1 focus:ring-blue-400 focus:border-blue-400" | ||||
| 					> | ||||
| 				</div> | ||||
| @@ -143,6 +144,7 @@ | ||||
| 						type="text" | ||||
| 						id="place-search" | ||||
| 						placeholder="Ortsname eingeben..." | ||||
| 						autocomplete="off" | ||||
| 						class="flex-1 px-2 py-1 border border-slate-300 rounded text-sm bg-white focus:outline-none focus:ring-1 focus:ring-blue-400 focus:border-blue-400" | ||||
| 					> | ||||
| 				</div> | ||||
| @@ -154,6 +156,10 @@ | ||||
| 							<div class="place-item odd:bg-slate-50 even:bg-white"> | ||||
| 								<a href="/ort/{{ $place.ID }}" class="block px-2 py-1 hover:bg-blue-50 border-b border-slate-100 last:border-b-0"> | ||||
| 									<span class="place-name font-medium text-slate-800">{{ $place.Name }}</span> | ||||
| 									{{ $modernName := GetModernPlaceName $place.Geo $place.Name }} | ||||
| 									{{ if ne $modernName "" }} | ||||
| 										<span class="text-xs text-slate-400 ml-2">{{ $modernName }}</span> | ||||
| 									{{ end }} | ||||
| 								</a> | ||||
| 							</div> | ||||
| 						{{ end }} | ||||
|   | ||||
| @@ -1,722 +0,0 @@ | ||||
| {{ if .model.SelectedPlace }} | ||||
| 	<!-- Single Place Detail View --> | ||||
| 	<div class="max-w-7xl mx-auto px-8 py-8"> | ||||
| 		<div class="bg-white px-6 py-6 rounded w-full"> | ||||
| 			<!-- Back Navigation --> | ||||
| 			<div class="mb-6"> | ||||
| 				<a href="/ort/" class="inline-flex items-center hover:text-black text-gray-600 transition-colors text-xl no-underline font-bold"> | ||||
| 					<i class="ri-arrow-left-line mr-1 text-xl font-bold"></i> | ||||
| 					Orte | ||||
| 				</a> | ||||
| 			</div> | ||||
|  | ||||
| 			<!-- Place Header --> | ||||
| 			<div class="mb-8"> | ||||
| 				{{ $geonames := GetGeonames .model.SelectedPlace.Place.Geo }} | ||||
|  | ||||
| 				<!-- Name and external links - similar to akteure header --> | ||||
| 				<div class="flex items-start justify-between gap-4"> | ||||
| 					<div class="flex-1"> | ||||
| 						<h1 class="text-3xl font-bold text-slate-800 mb-2"> | ||||
| 							{{ if .model.SelectedPlace.Place.Names }} | ||||
| 								{{ index .model.SelectedPlace.Place.Names 0 }} | ||||
| 							{{ else }} | ||||
| 								{{ .model.SelectedPlace.Place.ID }} | ||||
| 							{{ end }} | ||||
| 						</h1> | ||||
|  | ||||
| 						<!-- Geographic Information from Geonames --> | ||||
| 						{{ if ne $geonames nil }} | ||||
| 							<div class="text-lg text-slate-700 mb-2"> | ||||
| 								<!-- Modern Country Info (only if not Germany) --> | ||||
| 								{{ if and (ne $geonames.CountryName "") (ne $geonames.CountryName "Germany") }} | ||||
| 									<div class="mb-1"> | ||||
| 										{{ $mainPlaceName := "" }} | ||||
| 										{{ if .model.SelectedPlace.Place.Names }} | ||||
| 											{{ $mainPlaceName = index .model.SelectedPlace.Place.Names 0 }} | ||||
| 										{{ end }} | ||||
| 										{{ if eq $geonames.CountryName "France" }} | ||||
| 											heutiges Frankreich{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 										{{ else if eq $geonames.CountryName "United Kingdom" }} | ||||
| 											heutiges Großbritannien{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 										{{ else if eq $geonames.CountryName "Russia" }} | ||||
| 											heutiges Russland{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 										{{ else if or (eq $geonames.CountryName "Czech Republic") (eq $geonames.CountryName "Czechia") }} | ||||
| 											heutiges Tschechien{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 										{{ else if or (eq $geonames.CountryName "Netherlands") (eq $geonames.CountryName "The Netherlands") }} | ||||
| 											heutige Niederlande{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 										{{ else if eq $geonames.CountryName "Poland" }} | ||||
| 											heutiges Polen{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 										{{ else if eq $geonames.CountryName "Switzerland" }} | ||||
| 											heutige Schweiz{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 										{{ else if eq $geonames.CountryName "Latvia" }} | ||||
| 											heutiges Lettland{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 										{{ else if eq $geonames.CountryName "Sweden" }} | ||||
| 											heutiges Schweden{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 										{{ else if eq $geonames.CountryName "Austria" }} | ||||
| 											heutiges Österreich{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 										{{ else if eq $geonames.CountryName "Belgium" }} | ||||
| 											heutiges Belgien{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 										{{ else if eq $geonames.CountryName "Slovakia" }} | ||||
| 											heutige Slowakei{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 										{{ else if eq $geonames.CountryName "Finland" }} | ||||
| 											heutiges Finnland{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 										{{ else if eq $geonames.CountryName "Denmark" }} | ||||
| 											heutiges Dänemark{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 										{{ else }} | ||||
| 											{{ $geonames.CountryName }} | ||||
| 										{{ end }} | ||||
| 									</div> | ||||
| 								{{ end }} | ||||
|  | ||||
| 								<!-- Coordinates --> | ||||
| 								<div class="text-slate-600 text-base space-y-1"> | ||||
| 									{{ if and (ne $geonames.Lat "") (ne $geonames.Lng "") }} | ||||
| 										<div> | ||||
| 											<i class="ri-map-pin-line mr-1"></i><a href="https://www.openstreetmap.org/?mlat={{ $geonames.Lat }}&mlon={{ $geonames.Lng }}&zoom=12" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-700 underline">{{ $geonames.Lat }}, {{ $geonames.Lng }}</a> | ||||
| 										</div> | ||||
| 									{{ end }} | ||||
| 								</div> | ||||
| 							</div> | ||||
| 						{{ else }} | ||||
| 							<!-- Fallback when no Geonames data --> | ||||
| 							{{ if .model.SelectedPlace.Place.Geo }} | ||||
| 								<p class="text-slate-600 mb-2"> | ||||
| 									<i class="ri-map-pin-line mr-1"></i> | ||||
| 									<a href="{{ .model.SelectedPlace.Place.Geo }}" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-700 underline"> | ||||
| 										Geonames | ||||
| 									</a> | ||||
| 								</p> | ||||
| 							{{ end }} | ||||
| 						{{ end }} | ||||
| 					</div> | ||||
|  | ||||
| 					<!-- External link symbols on the right - similar to akteure --> | ||||
| 					<div class="flex gap-3 flex-shrink-0 items-center"> | ||||
| 						{{ if ne $geonames nil }} | ||||
| 							<!-- Wikipedia link if available --> | ||||
| 							{{ if ne $geonames.WikipediaURL "" }} | ||||
| 								<a href="https://{{ $geonames.WikipediaURL }}" target="_blank" class="hover:opacity-80 transition-opacity" title="Wikipedia"> | ||||
| 									<img src="/assets/wikipedia.png" alt="Wikipedia" class="w-6 h-6"> | ||||
| 								</a> | ||||
| 							{{ end }} | ||||
| 						{{ end }} | ||||
|  | ||||
| 						<!-- Geonames link --> | ||||
| 						{{ if .model.SelectedPlace.Place.Geo }} | ||||
| 							<a href="{{ .model.SelectedPlace.Place.Geo }}" target="_blank" class="hover:opacity-80 transition-opacity no-underline" title="Geonames"> | ||||
| 								<i class="ri-global-line text-xl text-blue-600"></i> | ||||
| 							</a> | ||||
| 						{{ end }} | ||||
| 					</div> | ||||
| 				</div> | ||||
| 			</div> | ||||
|  | ||||
| 			<!-- Associated Pieces --> | ||||
| 			<div> | ||||
| 				<h2 class="text-xl font-semibold text-slate-800 mb-4"> | ||||
| 					<i class="ri-newspaper-line mr-2"></i><u class="decoration underline-offset-3">Verlinkte Beiträge</u> ({{ len .model.SelectedPlace.Pieces }}) | ||||
| 				</h2> | ||||
|  | ||||
| 				{{ if .model.SelectedPlace.Pieces }} | ||||
| 					<div class="space-y-2"> | ||||
| 						{{- /* Group pieces by their own title/incipit */ -}} | ||||
| 						{{- $groupedPieces := dict -}} | ||||
| 						{{- range $_, $p := .model.SelectedPlace.Pieces -}} | ||||
| 							{{- $groupKey := "" -}} | ||||
| 							{{- if $p.Title -}} | ||||
| 								{{- $groupKey = index $p.Title 0 -}} | ||||
| 							{{- else if $p.Incipit -}} | ||||
| 								{{- $groupKey = index $p.Incipit 0 -}} | ||||
| 							{{- else -}} | ||||
| 								{{- $groupKey = printf "untitled-%s" $p.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-1 hyphens-auto"> | ||||
| 							{{- /* Display grouped pieces */ -}} | ||||
| 							{{- range $groupKey, $groupedItems := $groupedPieces -}} | ||||
| 								<div class="break-inside-avoid pl-4"> | ||||
| 									<div class="pb-1 indent-4"> | ||||
| 										{{- /* Use first piece for display text with colon format for places */ -}} | ||||
| 										{{ template "_piece_summary_for_place" (dict "Piece" (index $groupedItems 0) "CurrentActorID" "") }} | ||||
|  | ||||
| 										{{- /* Show all citations from all pieces in this group inline with commas */ -}} | ||||
| 										{{ " " }}{{- range $groupIndex, $groupItem := $groupedItems -}} | ||||
| 											{{- range $issueIndex, $issue := $groupItem.IssueRefs -}} | ||||
| 												{{- if or (gt $groupIndex 0) (gt $issueIndex 0) }}, {{ end -}} | ||||
| 												<span class="text-blue-600 hover:text-blue-700 underline decoration-dotted hover:decoration-solid [&>a]:text-blue-600 [&>a:hover]:text-blue-700">{{- template "_citation" $issue -}}</span>{{- end -}} | ||||
| 										{{- end -}} | ||||
|  | ||||
| 										{{- /* Add "Ganzer Beitrag" link if piece spans multiple issues */ -}} | ||||
| 										{{- $firstGroupItem := index $groupedItems 0 -}} | ||||
| 										{{- if gt (len $firstGroupItem.IssueRefs) 1 -}} | ||||
| 											{{ " " }}<div class="inline-flex items-center gap-1 px-2 py-1 bg-blue-50 | ||||
| 											hover:bg-blue-100 text-blue-700 hover:text-blue-800 border border-blue-200 | ||||
| 											hover:border-blue-300 rounded text-xs font-medium transition-colors duration-200 | ||||
| 											indent-0"> | ||||
| 												<i class="ri-file-copy-2-line text-xs"></i> | ||||
| 												<a href="{{ GetPieceURL $firstGroupItem.ID }}" class=""> | ||||
| 													Ganzer Beitrag | ||||
| 												</a> | ||||
| 											</div> | ||||
| 										{{- end }} | ||||
| 									</div> | ||||
| 								</div> | ||||
| 							{{- end -}} | ||||
| 						</div> | ||||
| 					</div> | ||||
| 				{{ else }} | ||||
| 					<p class="text-slate-500 italic">Keine verlinkten Beiträge für diesen Ort gefunden.</p> | ||||
| 				{{ end }} | ||||
| 			</div> | ||||
|  | ||||
| 		</div> | ||||
| 	</div> | ||||
|  | ||||
| {{ else }} | ||||
| 	<!-- Places Overview --> | ||||
| 	<div class="max-w-7xl mx-auto px-8 py-8"> | ||||
| 		<div class="bg-white px-6 py-6 rounded w-full"> | ||||
| 			<h1 class="text-3xl font-bold text-slate-800 mb-8">Orte</h1> | ||||
|  | ||||
| 			<!-- Available Letters Navigation --> | ||||
|  | ||||
| 			<!-- Places List --> | ||||
| 			{{ if .model.Places }} | ||||
| 				<div> | ||||
| 					<h2 class="text-lg font-semibold text-slate-700 mb-4"> | ||||
| 						Alle Orte ({{ len .model.Places }}) | ||||
| 					</h2> | ||||
|  | ||||
| 					<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"> | ||||
| 						{{ range $placeID := .model.Sorted }} | ||||
| 							{{ $place := index $.model.Places $placeID }} | ||||
| 							{{ $geonames := GetGeonames $place.Geo }} | ||||
| 							<div class="border border-slate-200 rounded-lg hover:bg-slate-50 transition-colors h-24"> | ||||
| 								<a href="/ort/{{ $place.ID }}" class="block p-4 h-full flex flex-col justify-between"> | ||||
| 									<div class="flex items-start justify-between gap-2"> | ||||
| 										<div class="flex-1"> | ||||
| 											<h3 class="font-medium text-slate-800 mb-1"> | ||||
| 												{{ if $place.Names }} | ||||
| 													{{ index $place.Names 0 }} | ||||
| 												{{ else }} | ||||
| 													{{ $place.ID }} | ||||
| 												{{ end }} | ||||
| 											</h3> | ||||
| 											<!-- Show geographic info if available (only if not Germany) --> | ||||
| 											{{ if ne $geonames nil }} | ||||
| 												{{ if and (ne $geonames.CountryName "") (ne $geonames.CountryName "Germany") }} | ||||
| 													<p class="text-sm text-slate-600 mb-1"> | ||||
| 														<i class="ri-map-pin-line mr-1"></i> | ||||
| 														{{ $mainPlaceName := "" }} | ||||
| 														{{ if $place.Names }} | ||||
| 															{{ $mainPlaceName = index $place.Names 0 }} | ||||
| 														{{ end }} | ||||
| 														{{ if eq $geonames.CountryName "France" }} | ||||
| 															heutiges Frankreich{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 														{{ else if eq $geonames.CountryName "United Kingdom" }} | ||||
| 															heutiges Großbritannien{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 														{{ else if eq $geonames.CountryName "Russia" }} | ||||
| 															heutiges Russland{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 														{{ else if or (eq $geonames.CountryName "Czech Republic") (eq $geonames.CountryName "Czechia") }} | ||||
| 															heutiges Tschechien{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 														{{ else if or (eq $geonames.CountryName "Netherlands") (eq $geonames.CountryName "The Netherlands") }} | ||||
| 															heutige Niederlande{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 														{{ else if eq $geonames.CountryName "Poland" }} | ||||
| 															heutiges Polen{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 														{{ else if eq $geonames.CountryName "Switzerland" }} | ||||
| 															heutige Schweiz{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 														{{ else if eq $geonames.CountryName "Latvia" }} | ||||
| 															heutiges Lettland{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 														{{ else if eq $geonames.CountryName "Sweden" }} | ||||
| 															heutiges Schweden{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 														{{ else if eq $geonames.CountryName "Austria" }} | ||||
| 															heutiges Österreich{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 														{{ else if eq $geonames.CountryName "Belgium" }} | ||||
| 															heutiges Belgien{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 														{{ else if eq $geonames.CountryName "Slovakia" }} | ||||
| 															heutige Slowakei{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 														{{ else if eq $geonames.CountryName "Finland" }} | ||||
| 															heutiges Finnland{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 														{{ else if eq $geonames.CountryName "Denmark" }} | ||||
| 															heutiges Dänemark{{- $modernName := "" -}} | ||||
| {{- $hasGermanName := false -}} | ||||
| {{- range $altName := $geonames.AlternateNames -}} | ||||
| {{- if eq $altName.Lang "de" -}} | ||||
| {{- $hasGermanName = true -}} | ||||
| {{- if $altName.IsPreferredName -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- break -}} | ||||
| {{- else if eq $modernName "" -}} | ||||
| {{- $modernName = $altName.Name -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- end -}} | ||||
| {{- if not $hasGermanName -}} | ||||
| {{- $modernName = $geonames.ToponymName -}} | ||||
| {{- end -}} | ||||
| {{- if and (ne $modernName "") (ne (lower $modernName) (lower $mainPlaceName)) -}}, {{ $modernName }}{{- end }} | ||||
| 														{{ else }} | ||||
| 															{{ $geonames.CountryName }} | ||||
| 														{{ end }} | ||||
| 													</p> | ||||
| 												{{ end }} | ||||
| 											{{ else if $place.Geo }} | ||||
| 												<p class="text-sm text-slate-600"> | ||||
| 													<i class="ri-map-pin-line mr-1"></i>Geonames verfügbar | ||||
| 												</p> | ||||
| 											{{ end }} | ||||
| 										</div> | ||||
|  | ||||
| 									</div> | ||||
| 								</a> | ||||
| 							</div> | ||||
| 						{{ end }} | ||||
| 					</div> | ||||
| 				</div> | ||||
| 			{{ else }} | ||||
| 				<p class="text-slate-500 italic">Keine Orte gefunden.</p> | ||||
| 			{{ end }} | ||||
| 		</div> | ||||
| 	</div> | ||||
| {{ end }} | ||||
							
								
								
									
										8
									
								
								views/routes/ort/components/_back_navigation.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								views/routes/ort/components/_back_navigation.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| {{- /* Back navigation for individual place pages */ -}} | ||||
| <!-- Back Navigation --> | ||||
| <div class="mb-6"> | ||||
| 	<a href="/ort/" class="inline-flex items-center hover:text-black text-gray-600 transition-colors text-xl no-underline font-bold"> | ||||
| 		<i class="ri-arrow-left-line mr-1 text-xl font-bold"></i> | ||||
| 		Orte | ||||
| 	</a> | ||||
| </div> | ||||
							
								
								
									
										42
									
								
								views/routes/ort/components/_place_card.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								views/routes/ort/components/_place_card.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,42 @@ | ||||
| {{- /* Individual place card for overview grid */ -}} | ||||
| {{ $geonames := GetGeonames .Geo }} | ||||
| {{ $mainPlaceName := "" }} | ||||
| {{ if .Names }} | ||||
| 	{{ $mainPlaceName = index .Names 0 }} | ||||
| {{ else }} | ||||
| 	{{ $mainPlaceName = .ID }} | ||||
| {{ end }} | ||||
| {{ $modernName := GetModernPlaceName .Geo $mainPlaceName }} | ||||
| <div class="border border-slate-200 rounded-lg hover:bg-slate-50 transition-colors h-20" data-place-name="{{ $mainPlaceName }}" data-modern-name="{{ $modernName }}"> | ||||
| 	<a href="/ort/{{ .ID }}" class="block p-4 h-full flex flex-col justify-between"> | ||||
| 		<div class="flex items-start justify-between gap-2"> | ||||
| 			<div class="flex-1"> | ||||
| 				<h3 class="font-medium text-slate-800 mb-1"> | ||||
| 					{{ if .Names }} | ||||
| 						{{ index .Names 0 }} | ||||
| 					{{ else }} | ||||
| 						{{ .ID }} | ||||
| 					{{ end }} | ||||
| 				</h3> | ||||
| 				<!-- Show geographic info if available (only if not Germany) --> | ||||
| 				{{ if ne $geonames nil }} | ||||
| 					{{ $mainPlaceName := "" }} | ||||
| 					{{ if .Names }} | ||||
| 						{{ $mainPlaceName = index .Names 0 }} | ||||
| 					{{ end }} | ||||
| 					{{ $fullInfo := GetFullPlaceInfo .Geo $mainPlaceName }} | ||||
| 					{{ if ne $fullInfo "" }} | ||||
| 						<p class="text-sm text-slate-600 mb-1"> | ||||
| 							<i class="ri-map-pin-line mr-1"></i>{{ $fullInfo }} | ||||
| 						</p> | ||||
| 					{{ end }} | ||||
| 				{{ else if .Geo }} | ||||
| 					<p class="text-sm text-slate-600"> | ||||
| 						<i class="ri-map-pin-line mr-1"></i>Geonames verfügbar | ||||
| 					</p> | ||||
| 				{{ end }} | ||||
| 			</div> | ||||
|  | ||||
| 		</div> | ||||
| 	</a> | ||||
| </div> | ||||
							
								
								
									
										71
									
								
								views/routes/ort/components/_place_header.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								views/routes/ort/components/_place_header.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,71 @@ | ||||
| {{- /* Place header with name, geographic info, and external links */ -}} | ||||
| <!-- Place Header --> | ||||
| <div class="mb-8"> | ||||
| 	{{ $geonames := GetGeonames .Place.Geo }} | ||||
|  | ||||
| 	<!-- Name and external links - similar to akteure header --> | ||||
| 	<div class="flex items-start justify-between gap-4"> | ||||
| 		<div class="flex-1"> | ||||
| 			<h1 class="text-3xl font-bold text-slate-800 mb-2"> | ||||
| 				{{ if .Place.Names }} | ||||
| 					{{ index .Place.Names 0 }} | ||||
| 				{{ else }} | ||||
| 					{{ .Place.ID }} | ||||
| 				{{ end }} | ||||
| 			</h1> | ||||
|  | ||||
| 			<!-- Geographic Information from Geonames --> | ||||
| 			{{ if ne $geonames nil }} | ||||
| 				<div class="text-lg text-slate-700 mb-2"> | ||||
| 					<!-- Modern Country Info (only if not Germany) --> | ||||
| 					{{ $mainPlaceName := "" }} | ||||
| 					{{ if .Place.Names }} | ||||
| 						{{ $mainPlaceName = index .Place.Names 0 }} | ||||
| 					{{ end }} | ||||
| 					{{ $fullInfo := GetFullPlaceInfo .Place.Geo $mainPlaceName }} | ||||
| 					{{ if ne $fullInfo "" }} | ||||
| 						<div class="mb-1">{{ $fullInfo }}</div> | ||||
| 					{{ end }} | ||||
|  | ||||
| 					<!-- Coordinates --> | ||||
| 					<div class="text-slate-600 text-base space-y-1"> | ||||
| 						{{ if and (ne $geonames.Lat "") (ne $geonames.Lng "") }} | ||||
| 							<div> | ||||
| 								<i class="ri-map-pin-line mr-1"></i><a href="https://www.openstreetmap.org/?mlat={{ $geonames.Lat }}&mlon={{ $geonames.Lng }}&zoom=12" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-700 underline">{{ $geonames.Lat }}, {{ $geonames.Lng }}</a> | ||||
| 							</div> | ||||
| 						{{ end }} | ||||
| 					</div> | ||||
| 				</div> | ||||
| 			{{ else }} | ||||
| 				<!-- Fallback when no Geonames data --> | ||||
| 				{{ if .Place.Geo }} | ||||
| 					<p class="text-slate-600 mb-2"> | ||||
| 						<i class="ri-map-pin-line mr-1"></i> | ||||
| 						<a href="{{ .Place.Geo }}" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-700 underline"> | ||||
| 							Geonames | ||||
| 						</a> | ||||
| 					</p> | ||||
| 				{{ end }} | ||||
| 			{{ end }} | ||||
| 		</div> | ||||
|  | ||||
| 		<!-- External link symbols on the right - similar to akteure --> | ||||
| 		<div class="flex gap-3 flex-shrink-0 items-center"> | ||||
| 			{{ if ne $geonames nil }} | ||||
| 				<!-- Wikipedia link if available --> | ||||
| 				{{ if ne $geonames.WikipediaURL "" }} | ||||
| 					<a href="https://{{ $geonames.WikipediaURL }}" target="_blank" class="hover:opacity-80 transition-opacity" title="Wikipedia"> | ||||
| 						<img src="/assets/wikipedia.png" alt="Wikipedia" class="w-6 h-6"> | ||||
| 					</a> | ||||
| 				{{ end }} | ||||
| 			{{ end }} | ||||
|  | ||||
| 			<!-- Geonames link --> | ||||
| 			{{ if .Place.Geo }} | ||||
| 				<a href="{{ .Place.Geo }}" target="_blank" class="hover:opacity-80 transition-opacity no-underline" title="Geonames"> | ||||
| 					<i class="ri-global-line text-xl text-blue-600"></i> | ||||
| 				</a> | ||||
| 			{{ end }} | ||||
| 		</div> | ||||
| 	</div> | ||||
| </div> | ||||
							
								
								
									
										98
									
								
								views/routes/ort/components/_place_pieces.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										98
									
								
								views/routes/ort/components/_place_pieces.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,98 @@ | ||||
| {{- /* Associated pieces section for place detail view */ -}} | ||||
| <!-- Associated Pieces --> | ||||
| <div> | ||||
| 	<h2 class="text-xl font-semibold text-slate-800 mb-4"> | ||||
| 		<i class="ri-newspaper-line mr-2"></i><u class="decoration underline-offset-3">Verlinkte Beiträge</u> ({{ len .Pieces }}) | ||||
| 	</h2> | ||||
|  | ||||
| 	{{ if .Pieces }} | ||||
| 		{{- /* Group pieces by year */ -}} | ||||
| 		{{- $piecesByYear := dict -}} | ||||
| 		{{- range $_, $p := .Pieces -}} | ||||
| 			{{- range $issueRef := $p.IssueRefs -}} | ||||
| 				{{- $year := printf "%d" $issueRef.When.Year -}} | ||||
| 				{{- $existing := index $piecesByYear $year -}} | ||||
| 				{{- if $existing -}} | ||||
| 					{{- $piecesByYear = merge $piecesByYear (dict $year (append $existing $p)) -}} | ||||
| 				{{- else -}} | ||||
| 					{{- $piecesByYear = merge $piecesByYear (dict $year (slice $p)) -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 		{{- /* Get sorted years */ -}} | ||||
| 		{{- $sortedYears := slice -}} | ||||
| 		{{- range $year, $pieces := $piecesByYear -}} | ||||
| 			{{- $sortedYears = append $sortedYears $year -}} | ||||
| 		{{- end -}} | ||||
| 		{{- $sortedYears = sortStrings $sortedYears -}} | ||||
|  | ||||
| 		<div class="space-y-6 max-w-[85ch]"> | ||||
| 			{{- range $year := $sortedYears -}} | ||||
| 				{{- $yearPieces := index $piecesByYear $year -}} | ||||
|  | ||||
| 				<!-- Year Header --> | ||||
| 				<div> | ||||
| 					<h3 class="text-lg font-bold font-serif text-slate-800 mb-3">{{ $year }}</h3> | ||||
|  | ||||
| 					<div class="space-y-1"> | ||||
| 						{{- /* Group pieces by title within each year */ -}} | ||||
| 						{{- $groupedPieces := dict -}} | ||||
| 						{{- range $_, $p := $yearPieces -}} | ||||
| 							{{- $groupKey := "" -}} | ||||
| 							{{- if $p.Title -}} | ||||
| 								{{- $groupKey = index $p.Title 0 -}} | ||||
| 							{{- else if $p.Incipit -}} | ||||
| 								{{- $groupKey = index $p.Incipit 0 -}} | ||||
| 							{{- else -}} | ||||
| 								{{- $groupKey = printf "untitled-%s" $p.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 -}} | ||||
|  | ||||
| 						{{- range $groupKey, $groupedItems := $groupedPieces -}} | ||||
| 							<div> | ||||
| 								<div class="pb-1 text-lg indent-4"> | ||||
| 									{{- /* Use first piece for display text with colon format for places */ -}} | ||||
| 									{{ template "_piece_summary_for_place" (dict "Piece" (index $groupedItems 0) "CurrentActorID" "") }} | ||||
|  | ||||
| 									{{- /* Show all citations from all pieces in this group inline with commas */ -}} | ||||
| 									{{ " " }}{{- range $groupIndex, $groupItem := $groupedItems -}} | ||||
| 										{{- range $issueIndex, $issue := $groupItem.IssueRefs -}} | ||||
| 											{{- /* Only show citations for the current year */ -}} | ||||
| 											{{- if eq (printf "%d" $issue.When.Year) $year -}} | ||||
| 												{{- if or (gt $groupIndex 0) (gt $issueIndex 0) }}, {{ end -}} | ||||
| 												<span class="text-blue-600 hover:text-blue-700 underline decoration-dotted hover:decoration-solid [&>a]:text-blue-600 [&>a:hover]:text-blue-700">{{- template "_citation" $issue -}}</span> | ||||
| 											{{- end -}} | ||||
| 										{{- end -}} | ||||
| 									{{- end -}} | ||||
|  | ||||
| 									{{- /* Add "Ganzer Beitrag" link if piece spans multiple issues */ -}} | ||||
| 									{{- $firstGroupItem := index $groupedItems 0 -}} | ||||
| 									{{- if gt (len $firstGroupItem.IssueRefs) 1 -}} | ||||
| 										{{ " " }}<div class="inline-flex items-center gap-1 px-2 py-1 bg-blue-50 | ||||
| 										hover:bg-blue-100 text-blue-700 hover:text-blue-800 border border-blue-200 | ||||
| 										hover:border-blue-300 rounded text-xs font-medium transition-colors duration-200"> | ||||
| 											<i class="ri-file-copy-2-line text-xs"></i> | ||||
| 											<a href="{{ GetPieceURL $firstGroupItem.ID }}" class=""> | ||||
| 												Ganzer Beitrag | ||||
| 											</a> | ||||
| 										</div> | ||||
| 									{{- end }} | ||||
| 								</div> | ||||
| 							</div> | ||||
| 						{{- end -}} | ||||
| 					</div> | ||||
| 				</div> | ||||
| 			{{- end -}} | ||||
| 		</div> | ||||
| 	{{ else }} | ||||
| 		<p class="text-slate-500 italic">Keine verlinkten Beiträge für diesen Ort gefunden.</p> | ||||
| 	{{ end }} | ||||
| </div> | ||||
							
								
								
									
										8
									
								
								views/routes/ort/detail/body.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								views/routes/ort/detail/body.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| <!-- Single Place Detail View --> | ||||
| <div class="max-w-7xl mx-auto px-8 py-8"> | ||||
| 	<div class="bg-white px-6 py-6 rounded w-full lg:min-w-[800px] xl:min-w-[900px]"> | ||||
| 		{{ template "_back_navigation" . }} | ||||
| 		{{ template "_place_header" .model.SelectedPlace }} | ||||
| 		{{ template "_place_pieces" .model.SelectedPlace }} | ||||
| 	</div> | ||||
| </div> | ||||
							
								
								
									
										36
									
								
								views/routes/ort/detail/head.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								views/routes/ort/detail/head.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | ||||
| {{ $place := .model.SelectedPlace.Place }} | ||||
| <title>{{ if $place.Names }}{{ index $place.Names 0 }}{{ else }}{{ $place.ID }}{{ end }} - KGPZ</title> | ||||
| <meta name="description" content="Informationen zu {{ if $place.Names }}{{ index $place.Names 0 }}{{ else }}{{ $place.ID }}{{ end }} in der Königsberger Gelehrten und Politischen Zeitung."> | ||||
| <meta name="keywords" content="{{ if $place.Names }}{{ index $place.Names 0 }}{{ else }}{{ $place.ID }}{{ end }}, Ort, KGPZ, Königsberg, Zeitung"> | ||||
|  | ||||
| <!-- Open Graph tags for social media --> | ||||
| <meta property="og:title" content="{{ if $place.Names }}{{ index $place.Names 0 }}{{ else }}{{ $place.ID }}{{ end }} - KGPZ"> | ||||
| <meta property="og:description" content="Informationen zu {{ if $place.Names }}{{ index $place.Names 0 }}{{ else }}{{ $place.ID }}{{ end }} in der Königsberger Gelehrten und Politischen Zeitung."> | ||||
| <meta property="og:type" content="article"> | ||||
| <meta property="og:url" content="/ort/{{ $place.ID }}"> | ||||
|  | ||||
| <!-- JSON-LD structured data --> | ||||
| {{ $geonames := GetGeonames $place.Geo }} | ||||
| {{ if ne $geonames nil }} | ||||
| 	<script type="application/ld+json"> | ||||
| 	{ | ||||
| 		"@context": "https://schema.org", | ||||
| 		"@type": "Place", | ||||
| 		"name": "{{ if $place.Names }}{{ index $place.Names 0 }}{{ else }}{{ $place.ID }}{{ end }}", | ||||
| 		"description": "Historischer Ort erwähnt in der Königsberger Gelehrten und Politischen Zeitung"{{ if or (and (ne $geonames.Lat "") (ne $geonames.Lng "")) (ne $geonames.CountryName "") (ne $place.Geo "") }},{{ end }} | ||||
| 		{{ if and (ne $geonames.Lat "") (ne $geonames.Lng "") }} | ||||
| 		"geo": { | ||||
| 			"@type": "GeoCoordinates", | ||||
| 			"latitude": {{ $geonames.Lat }}, | ||||
| 			"longitude": {{ $geonames.Lng }} | ||||
| 		}{{ if or (ne $geonames.CountryName "") (ne $place.Geo "") }},{{ end }} | ||||
| 		{{ end }} | ||||
| 		{{ if ne $geonames.CountryName "" }} | ||||
| 		"addressCountry": "{{ $geonames.CountryName }}"{{ if ne $place.Geo "" }},{{ end }} | ||||
| 		{{ end }} | ||||
| 		{{ if ne $place.Geo "" }} | ||||
| 		"sameAs": "{{ $place.Geo }}" | ||||
| 		{{ end }} | ||||
| 	} | ||||
| 	</script> | ||||
| {{ end }} | ||||
| @@ -1,42 +0,0 @@ | ||||
| {{ if .model.SelectedPlace }} | ||||
| 	{{ $place := .model.SelectedPlace.Place }} | ||||
| 	<title>{{ if $place.Names }}{{ index $place.Names 0 }}{{ else }}{{ $place.ID }}{{ end }} - KGPZ</title> | ||||
| 	<meta name="description" content="Informationen zu {{ if $place.Names }}{{ index $place.Names 0 }}{{ else }}{{ $place.ID }}{{ end }} in der Königsberger Gelehrten und Politischen Zeitung."> | ||||
| 	<meta name="keywords" content="{{ if $place.Names }}{{ index $place.Names 0 }}{{ else }}{{ $place.ID }}{{ end }}, Ort, KGPZ, Königsberg, Zeitung"> | ||||
|  | ||||
| 	<!-- Open Graph tags for social media --> | ||||
| 	<meta property="og:title" content="{{ if $place.Names }}{{ index $place.Names 0 }}{{ else }}{{ $place.ID }}{{ end }} - KGPZ"> | ||||
| 	<meta property="og:description" content="Informationen zu {{ if $place.Names }}{{ index $place.Names 0 }}{{ else }}{{ $place.ID }}{{ end }} in der Königsberger Gelehrten und Politischen Zeitung."> | ||||
| 	<meta property="og:type" content="article"> | ||||
| 	<meta property="og:url" content="/ort/{{ $place.ID }}"> | ||||
|  | ||||
| 	<!-- JSON-LD structured data --> | ||||
| 	{{ $geonames := GetGeonames $place.Geo }} | ||||
| 	{{ if ne $geonames nil }} | ||||
| 		<script type="application/ld+json"> | ||||
| 		{ | ||||
| 			"@context": "https://schema.org", | ||||
| 			"@type": "Place", | ||||
| 			"name": "{{ if $place.Names }}{{ index $place.Names 0 }}{{ else }}{{ $place.ID }}{{ end }}", | ||||
| 			"description": "Historischer Ort erwähnt in der Königsberger Gelehrten und Politischen Zeitung"{{ if or (and (ne $geonames.Lat "") (ne $geonames.Lng "")) (ne $geonames.CountryName "") (ne $place.Geo "") }},{{ end }} | ||||
| 			{{ if and (ne $geonames.Lat "") (ne $geonames.Lng "") }} | ||||
| 			"geo": { | ||||
| 				"@type": "GeoCoordinates", | ||||
| 				"latitude": {{ $geonames.Lat }}, | ||||
| 				"longitude": {{ $geonames.Lng }} | ||||
| 			}{{ if or (ne $geonames.CountryName "") (ne $place.Geo "") }},{{ end }} | ||||
| 			{{ end }} | ||||
| 			{{ if ne $geonames.CountryName "" }} | ||||
| 			"addressCountry": "{{ $geonames.CountryName }}"{{ if ne $place.Geo "" }},{{ end }} | ||||
| 			{{ end }} | ||||
| 			{{ if ne $place.Geo "" }} | ||||
| 			"sameAs": "{{ $place.Geo }}" | ||||
| 			{{ end }} | ||||
| 		} | ||||
| 		</script> | ||||
| 	{{ end }} | ||||
| {{ else }} | ||||
| 	<title>Orte - KGPZ</title> | ||||
| 	<meta name="description" content="Übersicht aller Orte in der Königsberger Gelehrten und Politischen Zeitung."> | ||||
| 	<meta name="keywords" content="Orte, Geografie, KGPZ, Königsberg, Zeitung"> | ||||
| {{ end }} | ||||
							
								
								
									
										27
									
								
								views/routes/ort/overview/body.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								views/routes/ort/overview/body.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| <!-- Places Overview --> | ||||
| <div class="max-w-7xl mx-auto px-8 py-8"> | ||||
| 	<div class="bg-white px-6 py-6 rounded w-full"> | ||||
| 		<h1 class="text-3xl font-bold text-slate-800 mb-8">Orte</h1> | ||||
|  | ||||
| 		<!-- Places List --> | ||||
| 		{{ if .model.Places }} | ||||
| 			<div> | ||||
| 				<!-- Search Filter --> | ||||
| 				<places-filter></places-filter> | ||||
|  | ||||
| 				<h2 class="text-lg font-semibold text-slate-700 mb-4" data-places-count> | ||||
| 					Alle Orte ({{ len .model.Places }}) | ||||
| 				</h2> | ||||
|  | ||||
| 				<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 lg:min-w-[768px] xl:min-w-[1024px]"> | ||||
| 					{{ range $placeID := .model.Sorted }} | ||||
| 						{{ $place := index $.model.Places $placeID }} | ||||
| 						{{ template "_place_card" $place }} | ||||
| 					{{ end }} | ||||
| 				</div> | ||||
| 			</div> | ||||
| 		{{ else }} | ||||
| 			<p class="text-slate-500 italic">Keine Orte gefunden.</p> | ||||
| 		{{ end }} | ||||
| 	</div> | ||||
| </div> | ||||
							
								
								
									
										3
									
								
								views/routes/ort/overview/head.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								views/routes/ort/overview/head.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| <title>Orte - KGPZ</title> | ||||
| <meta name="description" content="Übersicht aller Orte in der Königsberger Gelehrten und Politischen Zeitung."> | ||||
| <meta name="keywords" content="Orte, Geografie, KGPZ, Königsberg, Zeitung"> | ||||
		Reference in New Issue
	
	Block a user
	 Simon Martens
					Simon Martens