diff --git a/views/routes/components/_page_action_buttons.gohtml b/views/routes/components/_page_action_buttons.gohtml
new file mode 100644
index 0000000..dac22c4
--- /dev/null
+++ b/views/routes/components/_page_action_buttons.gohtml
@@ -0,0 +1,62 @@
+{{- /*
+ Shared Page Action Buttons Component
+ Action buttons for page sharing, citation, and enlargement
+
+ Usage: {{ template "_page_action_buttons" (dict
+ "PageNumber" $pageNumber
+ "IsBeilage" $isBeilage
+ "PartNumber" $partNumber
+ "ImageElement" $imageElement
+ "ButtonSize" "small|medium"
+ "ShowZoom" true|false
+ ) }}
+
+ Parameters:
+ - PageNumber: The page number
+ - IsBeilage: Whether this is a Beilage page (default: false)
+ - PartNumber: Part number for piece view (optional)
+ - ImageElement: CSS selector for the image element to enlarge (e.g., ".piece-page-image")
+ - ButtonSize: "small" for 6x6, "medium" for larger buttons (default: "small")
+ - ShowZoom: Whether to show the zoom button (default: true)
+*/ -}}
+
+{{- $pageNumber := .PageNumber -}}
+{{- $isBeilage := .IsBeilage -}}
+{{- if eq $isBeilage nil -}}{{ $isBeilage = false }}{{- end -}}
+{{- $partNumber := .PartNumber -}}
+{{- $imageElement := .ImageElement -}}
+{{- if not $imageElement -}}{{ $imageElement = ".newspaper-page-image, .piece-page-image" }}{{- end -}}
+{{- $buttonSize := .ButtonSize -}}
+{{- if not $buttonSize -}}{{ $buttonSize = "small" }}{{- end -}}
+{{- $showZoom := .ShowZoom -}}
+{{- if eq $showZoom nil -}}{{ $showZoom = true }}{{- end -}}
+
+{{- $sizeClasses := "w-6 h-6" -}}
+{{- $iconSize := "text-xs" -}}
+{{- if eq $buttonSize "medium" -}}
+ {{- $sizeClasses = "w-8 h-8" -}}
+ {{- $iconSize = "text-sm" -}}
+{{- end -}}
+
+
+
+
+
+
+
+
+{{ if $showZoom }}
+
+{{ end }}
\ No newline at end of file
diff --git a/views/routes/components/_page_modal.gohtml b/views/routes/components/_page_modal.gohtml
new file mode 100644
index 0000000..a111f25
--- /dev/null
+++ b/views/routes/components/_page_modal.gohtml
@@ -0,0 +1,21 @@
+{{- /*
+ Shared Page Modal Component
+ Modal for enlarged page viewing used by both issue and piece pages
+
+ Usage: {{ template "_page_modal" }}
+*/ -}}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/views/routes/components/_unified_piece_entry.gohtml b/views/routes/components/_unified_piece_entry.gohtml
index e288040..c379e91 100644
--- a/views/routes/components/_unified_piece_entry.gohtml
+++ b/views/routes/components/_unified_piece_entry.gohtml
@@ -9,6 +9,7 @@
"ShowPlaceTags" true|false
"UseColonFormat" true|false
"ShowContinuation" true|false
+ "LongForm" true|false
) }}
Parameters:
@@ -18,6 +19,7 @@
- ShowPlaceTags: Whether to show place tags (default: true)
- UseColonFormat: Use colon format instead of "mit" for place view (default: false)
- ShowContinuation: Show continuation prefixes (default: true for issue mode)
+ - LongForm: Whether to show annotations in a new line after the piece (default: false)
*/ -}}
{{- $pieceInput := .Piece -}}
@@ -30,6 +32,8 @@
{{- if eq $useColonFormat nil -}}{{ $useColonFormat = false }}{{- end -}}
{{- $showContinuation := .ShowContinuation -}}
{{- if eq $showContinuation nil -}}{{ $showContinuation = (eq $displayMode "issue") }}{{- end -}}
+{{- $longForm := .LongForm -}}
+{{- if eq $longForm nil -}}{{ $longForm = false }}{{- end -}}
{{- /* Handle different piece types: viewmodels.PieceByIssue vs xmlmodels.Piece */ -}}
{{- $piece := $pieceInput -}}
diff --git a/views/routes/kategorie/pieces/body.gohtml b/views/routes/kategorie/pieces/body.gohtml
index 46f1da3..d37a5d7 100644
--- a/views/routes/kategorie/pieces/body.gohtml
+++ b/views/routes/kategorie/pieces/body.gohtml
@@ -60,11 +60,6 @@
{{- end -}}
-
- {{ .model.PieceCount }}
- {{ if eq .model.PieceCount 1 }}Beitrag{{ else }}Beiträge{{ end }}
- in der Kategorie „{{ index .model.Category.Names 0 }}" aus dem Jahr {{ .model.Year }}
-
@@ -77,8 +72,6 @@
{{- if .model.Pieces -}}
-
{{ .model.Year }}
-
{{- /* Group pieces by title within the year */ -}}
{{- $groupedPieces := dict -}}
{{- range $_, $p := .model.Pieces -}}
@@ -146,4 +139,4 @@
{{- end -}}
-
\ No newline at end of file
+
diff --git a/views/routes/ort/fragment/body.gohtml b/views/routes/ort/fragment/body.gohtml
index 1eb39f4..8322af1 100644
--- a/views/routes/ort/fragment/body.gohtml
+++ b/views/routes/ort/fragment/body.gohtml
@@ -1,4 +1,4 @@
{{- /* Fragment with specific class for HTMX selection */ -}}
-
\ No newline at end of file
+
+ {{ template "_page_modal" }}
\ No newline at end of file
diff --git a/views/routes/search/body.gohtml b/views/routes/search/body.gohtml
index c18fe1b..6a7db9b 100644
--- a/views/routes/search/body.gohtml
+++ b/views/routes/search/body.gohtml
@@ -1,133 +1,400 @@
{{ $model := .model }}
-
-
`;
@@ -721,23 +721,36 @@ customElements.define("navigation-menu", NavigationMenu);
/**
* Global event handler for quickfilter selections
- * Dispatches custom events when users select persons or places from quickfilter
+ * Dispatches custom events when users select persons, places, or categories from quickfilter
*/
document.addEventListener("DOMContentLoaded", function () {
- // Add event delegation for person and place links in quickfilter
+ // Add event delegation for person, place, and category links in quickfilter
document.addEventListener("click", function (event) {
- // Check if the clicked element is a person or place link within the quickfilter
- const quickfilterTarget = event.target.closest('a[href^="/akteure/"], a[href^="/ort/"]');
+ // Check if the clicked element is a person, place, or category link within the quickfilter
+ const quickfilterTarget = event.target.closest(
+ 'a[href^="/akteure/"], a[href^="/ort/"], a[href^="/kategorie/"]',
+ );
const filterContainer = document.getElementById("filter-container");
if (quickfilterTarget && filterContainer && filterContainer.contains(quickfilterTarget)) {
+ // Determine the type based on the URL
+ let type;
+ const href = quickfilterTarget.getAttribute("href");
+ if (href.startsWith("/akteure/")) {
+ type = "person";
+ } else if (href.startsWith("/ort/")) {
+ type = "place";
+ } else if (href.startsWith("/kategorie/")) {
+ type = "category";
+ }
+
// Dispatch custom event to notify components
const selectionEvent = new CustomEvent("quickfilter:selection", {
detail: {
- type: quickfilterTarget.getAttribute("href").startsWith("/akteure/") ? "person" : "place",
+ type: type,
source: "quickfilter",
- id: quickfilterTarget.getAttribute("href").split("/").pop(),
- url: quickfilterTarget.getAttribute("href"),
+ id: href.split("/").pop(),
+ url: href,
},
bubbles: true,
});