diff --git a/migrations/seed/entries.go b/migrations/seed/entries.go index 6457448..dac3f8a 100644 --- a/migrations/seed/entries.go +++ b/migrations/seed/entries.go @@ -101,7 +101,7 @@ func handlePreferredTitleEntry( if band.Jahr == 0 { jahr = "[o. J.]" } else { - jahr = "(" + jahr + ")" + jahr = jahr } bevti := slices.IndexFunc(rels, func(r xmlmodels.Relation_Band_Reihe) bool { return r.Relation == "1" }) diff --git a/pagemodels/pagedata.go b/pagemodels/pagedata.go index 1647412..11ecd86 100644 --- a/pagemodels/pagedata.go +++ b/pagemodels/pagedata.go @@ -15,9 +15,9 @@ const ( P_DANK_NAME = "danksagungen" P_KONTAKT_NAME = "kontakt" P_LIT_NAME = "literatur" - P_EINFUEHRUNG_NAME = "einfuehrung" + P_EINFUEHRUNG_NAME = "einleitung" - P_DOK_NAME = "dokumentation" + P_DOK_NAME = "benutzerhinweise" T_ABK_NAME = "abkuerzungen" F_ABK = "Abkuerzung" diff --git a/pages/migrations_dokumentation/1739446703_insert_data_dokumentation.go b/pages/migrations_dokumentation/1739446703_insert_data_dokumentation.go index 6d1dc45..fa4be5f 100644 --- a/pages/migrations_dokumentation/1739446703_insert_data_dokumentation.go +++ b/pages/migrations_dokumentation/1739446703_insert_data_dokumentation.go @@ -12,7 +12,7 @@ import ( m "github.com/pocketbase/pocketbase/migrations" ) -const BESCHREIBUNG = "Musenalm: Verzeichnis deutschsprachiger Almanache des 18. und 19. Jahrhunderts. Dokumentation zur Sortierung und Struktur der Almanache." +const BESCHREIBUNG = "Musenalm: Verzeichnis deutschsprachiger Almanache des 18. und 19. Jahrhunderts. Dokumentation der Sortierung und Struktur der Almanache." const START = `
Wir sortieren die Reihentitel nach dem Kopf der Nominalphrase, den wir zu diesem Zweck ggf. an den Anfang stellen und mit Kommas abtrennen.
@@ -494,7 +494,7 @@ func init() { } record := pagemodels.NewTextPage(core.NewRecord(collection)) - record.SetTitle("Dokumentation") + record.SetTitle("Benutzerhinweise") record.SetText(START) record.SetDescription(BESCHREIBUNG) diff --git a/pages/migrations_einfuehrung/1739446703_insert_data_einfuehrung.go b/pages/migrations_einfuehrung/1739446703_insert_data_einfuehrung.go index 0c3d36c..eb6743e 100644 --- a/pages/migrations_einfuehrung/1739446703_insert_data_einfuehrung.go +++ b/pages/migrations_einfuehrung/1739446703_insert_data_einfuehrung.go @@ -42,7 +42,7 @@ func init() { } record := pagemodels.NewTextPage(core.NewRecord(collection)) - record.SetTitle("Einführung") + record.SetTitle("Einleitung") record.SetText(START) record.SetDescription(BESCHREIBUNG) diff --git a/pages/static.go b/pages/static.go index 12fc5f0..87db337 100644 --- a/pages/static.go +++ b/pages/static.go @@ -11,8 +11,8 @@ func init() { RegisterTextPage("/redaktion/kontakt/", pagemodels.P_KONTAKT_NAME) RegisterTextPage("/redaktion/danksagungen/", pagemodels.P_DANK_NAME) RegisterTextPage("/redaktion/literatur/", pagemodels.P_LIT_NAME) - RegisterTextPage("/redaktion/einfuehrung/", pagemodels.P_EINFUEHRUNG_NAME) - RegisterTextPage("/redaktion/dokumentation/", pagemodels.P_DOK_NAME) + RegisterTextPage("/redaktion/einleitung/", pagemodels.P_EINFUEHRUNG_NAME) + RegisterTextPage("/redaktion/benutzerhinweise/", pagemodels.P_DOK_NAME) RegisterTextPage("/redaktion/lesekabinett/", pagemodels.P_KABINETT_NAME) } diff --git a/views/assets/scripts.js b/views/assets/scripts.js index 76bf5c0..429803f 100644 --- a/views/assets/scripts.js +++ b/views/assets/scripts.js @@ -1,18 +1,18 @@ -var x = (r) => { +var T = (r) => { throw TypeError(r); }; -var _ = (r, t, e) => t.has(r) || x("Cannot " + e); -var c = (r, t, e) => (_(r, t, "read from private field"), e ? e.call(r) : t.get(r)), n = (r, t, e) => t.has(r) ? x("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), u = (r, t, e, i) => (_(r, t, "write to private field"), i ? i.call(r, e) : t.set(r, e), e), g = (r, t, e) => (_(r, t, "access private method"), e); -const S = "script[xslt-onload]", w = "xslt-template", k = "xslt-transformed", M = "filter-list", m = "filter-list-list", C = "filter-list-item", I = "filter-list-input", y = "filter-list-searchable", B = "scroll-button", q = "tool-tip", P = "abbrev-tooltips", H = "int-link", R = "popup-image", $ = "tab-list", N = "filter-pill", F = "image-reel"; +var _ = (r, t, e) => t.has(r) || T("Cannot " + e); +var c = (r, t, e) => (_(r, t, "read from private field"), e ? e.call(r) : t.get(r)), l = (r, t, e) => t.has(r) ? T("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), u = (r, t, e, i) => (_(r, t, "write to private field"), i ? i.call(r, e) : t.set(r, e), e), g = (r, t, e) => (_(r, t, "access private method"), e); +const k = "script[xslt-onload]", y = "xslt-template", S = "xslt-transformed", M = "filter-list", m = "filter-list-list", B = "filter-list-item", C = "filter-list-input", w = "filter-list-searchable", I = "scroll-button", q = "tool-tip", P = "abbrev-tooltips", R = "int-link", H = "popup-image", $ = "tab-list", O = "filter-pill", N = "image-reel"; var d, b, E; class V { constructor() { - n(this, b); - n(this, d); + l(this, b); + l(this, d); u(this, d, /* @__PURE__ */ new Map()); } setup() { - let t = htmx.findAll(S); + let t = htmx.findAll(k); for (let e of t) g(this, b, E).call(this, e); } @@ -23,9 +23,9 @@ class V { } } d = new WeakMap(), b = new WeakSet(), E = function(t) { - if (t.getAttribute(k) === "true" || !t.hasAttribute(w)) + if (t.getAttribute(S) === "true" || !t.hasAttribute(y)) return; - let e = "#" + t.getAttribute(w), i = c(this, d).get(e); + let e = "#" + t.getAttribute(y), i = c(this, d).get(e); if (!i) { let h = htmx.find(e); if (h) { @@ -34,10 +34,10 @@ d = new WeakMap(), b = new WeakSet(), E = function(t) { } else throw new Error("Unknown XSLT template: " + e); } - let s = new DOMParser().parseFromString(t.innerHTML, "application/xml"), a = i.transformToFragment(s, document), l = new XMLSerializer().serializeToString(a); - t.outerHTML = l; + let s = new DOMParser().parseFromString(t.innerHTML, "application/xml"), a = i.transformToFragment(s, document), n = new XMLSerializer().serializeToString(a); + t.outerHTML = n; }; -class O extends HTMLElement { +class F extends HTMLElement { constructor() { super(), this._value = "", this.render(); } @@ -106,13 +106,13 @@ class O extends HTMLElement { `; } } -var o, T, f, L; +var o, x, f, L; class U extends HTMLElement { constructor() { super(); - n(this, f); - n(this, o, !1); - n(this, T, ""); + l(this, f); + l(this, o, !1); + l(this, x, ""); this._items = [], this._url = "", this._filterstart = !1, this._placeholder = "Liste filtern...", this._queryparam = "", this._startparams = null, this.render(); } static get observedAttributes() { @@ -157,7 +157,7 @@ class U extends HTMLElement { let e = this.querySelector("#" + m); if (!e) return; - let i = new Mark(e.querySelectorAll("." + y)); + let i = new Mark(e.querySelectorAll("." + w)); this._filter && i.mark(this._filter, { separateWordSearch: !0 }); @@ -197,7 +197,7 @@ class U extends HTMLElement { } getLinkText(e) { let i = this.getSearchText(e); - return i === "" ? "" : `${i}`; + return i === "" ? "" : `${i}`; } getURL(e) { if (this._queryparam) { @@ -232,7 +232,7 @@ class U extends HTMLElement { + class="${C} w-full placeholder:italic px-2 py-0.5" /> `; @@ -256,7 +256,7 @@ class U extends HTMLElement { hx-swap="outerHTML show:none" hx-select="main" hx-target="main" - class="${C} block px-2.5 py-0.5 hover:bg-slate-200 no-underline ${s % 2 === 0 ? "bg-stone-100" : "bg-stone-50"}" + class="${B} block px-2.5 py-0.5 hover:bg-slate-200 no-underline ${s % 2 === 0 ? "bg-stone-100" : "bg-stone-50"}" ${g(this, f, L).call(this, i) ? 'aria-current="page"' : ""}> ${this.ActiveDot(i)} ${this.getLinkText(i)} @@ -268,7 +268,7 @@ class U extends HTMLElement { `; } } -o = new WeakMap(), T = new WeakMap(), f = new WeakSet(), L = function(e) { +o = new WeakMap(), x = new WeakMap(), f = new WeakSet(), L = function(e) { if (!e) return !1; let i = this.getHREF(e); @@ -420,16 +420,27 @@ class z extends HTMLElement { } class G extends HTMLElement { constructor() { - super(), this.overlay = null, this._preview = null, this._description = null, this._imageURL = "", this._hideDLButton = !1; + super(), this.overlay = null, this._others = null, this._thisindex = -1, this._preview = null, this._description = null, this._imageURL = "", this._hideDLButton = !1; } connectedCallback() { this.classList.add("cursor-pointer"), this.classList.add("select-none"), this._imageURL = this.getAttribute("data-image-url") || "", this._hideDLButton = this.getAttribute("data-hide-dl-button") || !1, this._preview = this.querySelector("img"), this._description = this.querySelector(".image-description"), this._preview && this._preview.addEventListener("click", () => { this.showOverlay(); }); + let t = this.closest("image-reel, .image-reel"); + t || (t = document), this._others = Array.from(t.querySelectorAll("popup-image:not(.hidden)")), this._thisindex = this._others.indexOf(this); } disconnectedCallback() { this.overlay && this.overlay.parentNode && this.overlay.parentNode.removeChild(this.overlay); } + Keys(t) { + t.repeat || (t.preventDefault(), t.key === "ArrowRight" ? this.next() : t.key === "ArrowLeft" ? this.prev() : t.key === "Escape" && this.hideOverlay()); + } + next() { + this._others[this._thisindex + 1] ? (this.hideOverlay(), this._others[this._thisindex + 1].showOverlay()) : document.addEventListener("keydown", this.Keys.bind(this), { once: !0 }); + } + prev() { + this._others[this._thisindex - 1] ? (this.hideOverlay(), this._others[this._thisindex - 1].showOverlay()) : document.addEventListener("keydown", this.Keys.bind(this), { once: !0 }); + } showOverlay() { this.overlay = document.createElement("div"), this.overlay.classList.add( "fixed", @@ -444,10 +455,12 @@ class G extends HTMLElement {