mirror of
				https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
				synced 2025-10-29 17:15:31 +00:00 
			
		
		
		
	reintro scrollspy
This commit is contained in:
		| @@ -5,10 +5,10 @@ | ||||
| 			{{ range $_, $l := .AvailableLetters }} | ||||
| 				{{ if eq $l (Upper $.Search) }} | ||||
| 					<!-- This is the active letter --> | ||||
| 					<span class="no-underline leading-none !m-0 !p-0 text-4xl font-bold text-red-600 pointer-events-none" aria-current="true">{{ $l }}</span> | ||||
| 					<span class="no-underline leading-none !m-0 !p-0 text-3xl font-bold text-red-600 pointer-events-none" aria-current="true">{{ $l }}</span> | ||||
| 				{{ else }} | ||||
| 					<!-- This is an inactive letter --> | ||||
| 					<a href="/akteure/{{ $l }}" class="no-underline leading-none !m-0 !p-0 text-2xl font-medium text-gray-700 hover:text-red-600 transition-colors">{{ $l }}</a> | ||||
| 					<a href="/akteure/{{ $l }}" class="no-underline leading-none !m-0 !p-0 text-xl font-medium text-gray-700 hover:text-red-600 transition-colors">{{ $l }}</a> | ||||
| 				{{ end }} | ||||
| 			{{ end }} | ||||
| 			<!-- Separator and Anonym link --> | ||||
| @@ -20,4 +20,4 @@ | ||||
| 			{{ end }} | ||||
| 		</div> | ||||
| 	</div> | ||||
| </div> | ||||
| </div> | ||||
|   | ||||
| @@ -1,15 +1,8 @@ | ||||
| {{- /* Shared back navigation for individual person pages */ -}} | ||||
| <div class="mb-6"> | ||||
| 	{{ if eq .ID "anonym" }} | ||||
| 		<a href="/akteure/a" class="inline-flex items-center text-black hover:text-gray-700 transition-colors text-xl no-underline font-bold"> | ||||
| 			<i class="ri-arrow-left-line mr-3 text-xl font-bold"></i> | ||||
| 			A | ||||
| 		</a> | ||||
| 	{{ else }} | ||||
| 		{{ $letter := Upper (FirstLetter .ID) }} | ||||
| 		<a href="/akteure/{{ $letter }}" class="inline-flex items-center text-black hover:text-gray-700 transition-colors text-xl no-underline font-bold"> | ||||
| 			<i class="ri-arrow-left-line mr-3 text-xl font-bold"></i> | ||||
| 		<a href="/akteure/{{ $letter }}" 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> | ||||
| 			{{ $letter }} | ||||
| 		</a> | ||||
| 	{{ end }} | ||||
| </div> | ||||
| </div> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
| 		<div class="flex flex-col lg:flex-row gap-6 w-full min-h-screen"> | ||||
| 			<!-- Column 1: Sticky Inhaltsverzeichnis --> | ||||
| 			<div class="lg:w-1/4 xl:w-1/4 2xl:w-1/4 3xl:w-1/5 flex-shrink-0 bg-slate-50 px-4 py-4"> | ||||
| 				<div class="sticky top-0 max-h-screen overflow-y-auto overscroll-contain bg-slate-50"> | ||||
| 				<div class="sticky top-4 max-h-screen overflow-y-auto overscroll-contain bg-slate-50"> | ||||
| 					<div class="mb-4"> | ||||
| 						{{ template "_title_nav" . }} | ||||
| 					</div> | ||||
| @@ -18,12 +18,12 @@ | ||||
| 			</div> | ||||
|  | ||||
| 			<!-- Column 2: Newspaper pages --> | ||||
| 			<div class="flex-1 py-4"> | ||||
| 			<div class="flex-1 py-4 pr-8 3xl:pr-0"> | ||||
| 				{{ template "_newspaper_layout" . }} | ||||
| 			</div> | ||||
|  | ||||
| 			<!-- Column 3: Navigation buttons --> | ||||
| 			<div class="w-16 lg:w-20 xl:w-24 flex-shrink-0 "> | ||||
| 			<div class="w-16 lg:w-20 hidden 3xl:block xl:w-24 flex-shrink-0 "> | ||||
| 				<div class="lg:sticky lg:top-12 lg:max-h-[calc(100vh-2rem)]"> | ||||
| 					<div class="space-y-3 flex flex-col items-center px-2 pt-8"> | ||||
| 						<button | ||||
| @@ -55,25 +55,25 @@ | ||||
|  | ||||
|  | ||||
| 						<!-- Separator for utility buttons --> | ||||
| 						<div class="w-full border-t border-gray-200 my-4"></div> | ||||
| 						<!-- <div class="w-full border-t border-gray-200 my-4"></div> --> | ||||
|  | ||||
| 						<!-- Share Link Button --> | ||||
| 						<button | ||||
| 							id="shareLinkBtn" | ||||
| 							onclick="shareCurrentPage()" | ||||
| 							class="w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-blue-100 hover:bg-blue-200 text-blue-700 hover:text-blue-800 border border-blue-300 transition-colors duration-200 flex items-center justify-center cursor-pointer" | ||||
| 							title="Link zur aktuellen Seite teilen"> | ||||
| 							<i class="ri-share-line text-lg lg:text-xl"></i> | ||||
| 						</button> | ||||
| 						<!-- <button --> | ||||
| 						<!-- 	id="shareLinkBtn" --> | ||||
| 						<!-- 	onclick="shareCurrentPage()" --> | ||||
| 						<!-- 	class="w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-blue-100 hover:bg-blue-200 text-blue-700 hover:text-blue-800 border border-blue-300 transition-colors duration-200 flex items-center justify-center cursor-pointer" --> | ||||
| 						<!-- 	title="Link zur aktuellen Seite teilen"> --> | ||||
| 						<!-- 	<i class="ri-share-line text-lg lg:text-xl"></i> --> | ||||
| 						<!-- </button> --> | ||||
|  | ||||
| 						<!-- Citation Button --> | ||||
| 						<button | ||||
| 							id="citationBtn" | ||||
| 							onclick="generateCitation()" | ||||
| 							class="w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-green-100 hover:bg-green-200 text-green-700 hover:text-green-800 border border-green-300 transition-colors duration-200 flex items-center justify-center cursor-pointer" | ||||
| 							title="Zitation für diese Seite generieren"> | ||||
| 							<i class="ri-file-text-line text-lg lg:text-xl"></i> | ||||
| 						</button> | ||||
| 						<!-- <button --> | ||||
| 						<!-- 	id="citationBtn" --> | ||||
| 						<!-- 	onclick="generateCitation()" --> | ||||
| 						<!-- 	class="w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-green-100 hover:bg-green-200 text-green-700 hover:text-green-800 border border-green-300 transition-colors duration-200 flex items-center justify-center cursor-pointer" --> | ||||
| 						<!-- 	title="Zitation für diese Seite generieren"> --> | ||||
| 						<!-- 	<i class="ri-file-text-line text-lg lg:text-xl"></i> --> | ||||
| 						<!-- </button> --> | ||||
| 					</div> | ||||
| 				</div> | ||||
| 			</div> | ||||
|   | ||||
| @@ -1,10 +1,10 @@ | ||||
| {{ $model := .model }} | ||||
|  | ||||
|  | ||||
| <div class="hyphens-auto mx-3"> | ||||
| <inhaltsverzeichnis-scrollspy class="hyphens-auto mx-3"> | ||||
| 	{{- if $model.Pieces.Pages -}} | ||||
| 		<div class="space-y-4"> | ||||
| 			<div class="mb-4"></div> | ||||
| 			<div class="mb-2"></div> | ||||
| 			{{ range $page := $model.Pieces.Pages }} | ||||
| 				{{ $pageItems := (index $model.Pieces.Items $page) }} | ||||
| 				{{ $firstItem := "" }} | ||||
| @@ -13,7 +13,7 @@ | ||||
|  | ||||
| 				<!-- Individual page entry --> | ||||
| 				<div | ||||
| 					class="mb-6 first:mb-0 pl-4 border-l-4 border-slate-300 page-entry" | ||||
| 					class="mb-4 first:mb-0 pl-2 3xl:pl-4 border-l-4 border-slate-300 page-entry" | ||||
| 					data-page-container="{{ $page }}"> | ||||
| 					<div class="flex items-center justify-between gap-2 mb-2"> | ||||
| 						<div class="flex items-center gap-2"> | ||||
| @@ -46,13 +46,16 @@ | ||||
| 						{{ if $pageItems }} | ||||
| 							{{ range $individualPiece := $pageItems }} | ||||
| 								<div | ||||
| 									class="inhalts-entry py-1 px-0 bg-slate-50 rounded hover:bg-slate-100 transition-colors duration-200 {{ if $individualPiece.PieceByIssue.IsContinuation }} | ||||
| 									class="inhalts-entry py-1 px-0 rounded {{ if $individualPiece.PieceByIssue.IsContinuation }} | ||||
| 										continuation-entry | ||||
| 									{{ end }}" | ||||
| 									data-page="{{ $page }}" | ||||
| 									{{ if $individualPiece.PieceByIssue.IsContinuation }} | ||||
| 										data-is-continuation="true" | ||||
| 									{{ end }} | ||||
| 									{{ if $individualPiece.PieceByIssue.ID }} | ||||
| 										data-multipart-id="{{ $individualPiece.PieceByIssue.ID }}" | ||||
| 									{{ end }} | ||||
| 									style="{{ if $individualPiece.PieceByIssue.IsContinuation }} | ||||
| 										display: none; | ||||
| 									{{ end }}"> | ||||
| @@ -61,7 +64,7 @@ | ||||
|  | ||||
| 									<!-- Links zu anderen Teilen: --> | ||||
| 									{{ if and (not $individualPiece.PieceByIssue.IsContinuation) (gt (len $individualPiece.IssueRefs) 1) }} | ||||
| 										<div class="mt-1 pt-1 border-t border-slate-100"> | ||||
| 										<div class="multipart-parts mt-1 pt-1 border-t border-slate-100"> | ||||
| 											<div class="flex items-center flex-wrap gap-1"> | ||||
| 												<i class="ri-links-line text-slate-600 text-sm mr-1"></i> | ||||
| 												{{ range $index, $issue := $individualPiece.IssueRefs }} | ||||
| @@ -147,7 +150,7 @@ | ||||
|  | ||||
| 				<!-- Individual beilage page entry --> | ||||
| 				<div | ||||
| 					class="mb-6 first:mb-0 pl-4 border-l-4 border-amber-400 page-entry" | ||||
| 					class="mb-4 first:mb-0 pl-2 3xl:pl-4 border-l-4 border-amber-400 page-entry" | ||||
| 					data-page-container="{{ $page }}" | ||||
| 					data-beilage="true"> | ||||
| 					<div class="flex items-center justify-between gap-2 mb-2"> | ||||
| @@ -188,6 +191,9 @@ | ||||
| 									{{ if $individualPiece.PieceByIssue.IsContinuation }} | ||||
| 										data-is-continuation="true" | ||||
| 									{{ end }} | ||||
| 									{{ if $individualPiece.PieceByIssue.ID }} | ||||
| 										data-multipart-id="{{ $individualPiece.PieceByIssue.ID }}" | ||||
| 									{{ end }} | ||||
| 									style="{{ if $individualPiece.PieceByIssue.IsContinuation }} | ||||
| 										display: none; | ||||
| 									{{ end }}"> | ||||
| @@ -196,7 +202,7 @@ | ||||
|  | ||||
| 									<!-- Links zu anderen Teilen: --> | ||||
| 									{{ if and (not $individualPiece.PieceByIssue.IsContinuation) (gt (len $individualPiece.IssueRefs) 1) }} | ||||
| 										<div class="mt-1 pt-1 border-t border-slate-100"> | ||||
| 										<div class="multipart-parts mt-1 pt-1 border-t border-slate-100"> | ||||
| 											<div class="flex items-center flex-wrap gap-1"> | ||||
| 												<i class="ri-links-line text-slate-600 text-sm mr-1"></i> | ||||
| 												{{ range $index, $issue := $individualPiece.IssueRefs }} | ||||
| @@ -254,4 +260,4 @@ | ||||
| 		</div> | ||||
| 	{{- end -}} | ||||
|  | ||||
| </div> | ||||
| </inhaltsverzeichnis-scrollspy> | ||||
|   | ||||
| @@ -29,11 +29,11 @@ | ||||
| 			{{- end -}} | ||||
|  | ||||
|  | ||||
| 		<div class="columns-2 gap-6"> | ||||
| 		<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"> | ||||
| 					<div class="pb-1 indent-4"> | ||||
| 						{{- /* Use first piece for display text */ -}} | ||||
| 						{{ template "_piece_summary" (dict "Piece" (index $groupedItems 0).Item "CurrentActorID" $a.ID) }} | ||||
|  | ||||
| @@ -46,7 +46,10 @@ | ||||
| 						{{- /* Add "Ganzer Beitrag" link if piece spans multiple issues */ -}} | ||||
| 						{{- $firstGroupItem := index $groupedItems 0 -}} | ||||
| 						{{- if gt (len $firstGroupItem.Item.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"> | ||||
| 							{{ " " }}<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.Item.ID }}" class=""> | ||||
| 									Ganzer Beitrag | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Simon Martens
					Simon Martens