mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-29 17:25:32 +00:00
Abschluss Personen & Startseite. Viele BUGFIXes
This commit is contained in:
@@ -34,7 +34,8 @@
|
||||
{{- range $i, $s := $model.result.Series -}}
|
||||
<div>
|
||||
<div class="{{ if $i -}}opacity-0 pointer-events-none select-none{{- end -}}">
|
||||
Reihentitel <i class="ri-arrow-right-wide-line"></i>
|
||||
<a href="/reihen/?letter={{- First $s.Title -}}" class="">Reihen</a>
|
||||
<i class="ri-arrow-right-wide-line"></i>
|
||||
</div>
|
||||
<div>
|
||||
<a href="/reihe/{{- $s.MusenalmID -}}">{{ $s.Title }}</a>
|
||||
|
||||
@@ -22,8 +22,10 @@
|
||||
{{- end -}}
|
||||
|
||||
|
||||
<div class="content flex flex-row font-serif" id="{{- $content.Id -}}">
|
||||
{{- if not $singleView -}}
|
||||
<div
|
||||
class="content flex flex-row font-serif {{ if or $entrySubView $singleView -}}text-lg{{- end -}}"
|
||||
id="{{- $content.MusenalmID -}}">
|
||||
{{- if and (not $singleView) (not $entrySubView) -}}
|
||||
<div class="w-36 shrink-0 grow-0 flex flex-col items-end columnone">
|
||||
{{- if $content.Extent -}}
|
||||
<div>
|
||||
@@ -126,16 +128,27 @@
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
<div class="w-24 shrink-0 grow-0 items-end flex flex-col columnfour">
|
||||
<div class="w-24 shrink-0 grow-0 items-end flex flex-col gap-y-1 columnfour">
|
||||
<div class="font-sans text-sm bg-stone-100 px-2 font-bold py-0.5 rounded w-max">
|
||||
<span class="text-xs font-normal pr-1">NR</span>
|
||||
{{ $content.MusenalmID -}}
|
||||
</div>
|
||||
<div class="font-sans py-0.5 text-xs">
|
||||
{{- if $entrySubView -}}
|
||||
{{- if $content.MusenalmType -}}
|
||||
<div class="flex flex-col gap-y-1 items-end">
|
||||
{{- range $_, $t := $content.MusenalmType -}}
|
||||
<div class="font-sans text-sm bg-stone-100 px-1 py-0.5 rounded w-max font-bold">
|
||||
{{- $t -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<div class="font-sans py-0.5 text-sm">
|
||||
<a
|
||||
href="/beitrag/{{ $content.MusenalmID }}"
|
||||
class="no-underline rounded bg-stone-100 px-1.5">
|
||||
Einzelansicht <i class="ri-links-line"></i>
|
||||
Link <i class="ri-links-line"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="font-sans py-0.5 text-xs">
|
||||
<div class="font-sans py-0.5 text-sm">
|
||||
<a href="/reihe/{{ $r.MusenalmID }}" class="no-underline rounded bg-stone-100 px-1.5">
|
||||
<i class="ri-links-line"></i> Permalink
|
||||
<i class="ri-links-line"></i> Link
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,6 +19,23 @@
|
||||
{{- else -}}
|
||||
[o.J.]
|
||||
{{- end -}}
|
||||
|
||||
{{- if not $bd.TitleStmt -}}
|
||||
<tool-tip position="right" class="inline">
|
||||
<i class="ri-forbid-2-line"></i>
|
||||
<div class="data-tip">Keine nähere Erfassung</div>
|
||||
</tool-tip>
|
||||
{{- else if eq $bd.EditState "Edited" -}}
|
||||
<tool-tip position="right" class="inline">
|
||||
<i class="ri-checkbox-circle-line"></i>
|
||||
<div class="data-tip">Mit erfassten Beiträgen</div>
|
||||
</tool-tip>
|
||||
{{- else -}}
|
||||
<tool-tip position="right" class="inline">
|
||||
<i class="ri-information-line"></i>
|
||||
<div class="data-tip">Mit genaueren Titelangaben</div>
|
||||
</tool-tip>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- if not (eq $rel.Type "Bevorzugter Reihentitel") -}}
|
||||
<div class="text-xs whitespace-nowrap">
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
<div id="breadcrumbs">
|
||||
<div>
|
||||
<div>
|
||||
Personen und Körperschaften <i class="ri-arrow-right-wide-line"></i> Einzelansicht
|
||||
<a href="/personen?letter={{- First $model.result.Agent.Name -}}"
|
||||
>Personen & Körperschaften</a
|
||||
>
|
||||
<i class="ri-arrow-right-wide-line"></i> <b>{{ $model.result.Agent.Name }}</b>
|
||||
</div>
|
||||
<div class="backbutton">
|
||||
@@ -72,21 +74,34 @@
|
||||
|
||||
{{- if .result.BResult -}}
|
||||
<div class="container-normal flex flex-col font-serif mt-7 gap-y-6">
|
||||
<h2 class="font-bold">
|
||||
<i class="ri-information-2-line"></i>
|
||||
{{ if eq $model.result.LenEntries 1 }}
|
||||
Ein Band
|
||||
{{- else }}
|
||||
{{- $model.result.LenEntries }}
|
||||
Bände
|
||||
{{- end }}
|
||||
in
|
||||
{{- if eq $model.result.LenSeries 1 }}
|
||||
einer Reihe
|
||||
{{- else }}
|
||||
{{ $model.result.LenSeries }} Reihen
|
||||
{{- end }}
|
||||
gefunden:
|
||||
<h2 class="border-b font-sans flex flex-row justify-between items-end">
|
||||
<div>
|
||||
<i class="ri-book-line"></i>
|
||||
{{ if eq $model.result.LenEntries 1 }}
|
||||
<b>Ein Band</b>
|
||||
{{- else }}
|
||||
<b>{{- $model.result.LenEntries }}</b>
|
||||
Bände
|
||||
{{- end }}
|
||||
in
|
||||
{{- if eq $model.result.LenSeries 1 }}
|
||||
<b>einer Reihe</b>
|
||||
{{- else }}
|
||||
<b>{{ $model.result.LenSeries }}</b> Reihen
|
||||
{{- end }}
|
||||
</div>
|
||||
|
||||
{{- if len $model.result.CResult -}}
|
||||
<div class="flex flex-row bg-stone-100 px-2 py-1 items-center">
|
||||
<a class="" href="#almanachcontents"> Zu den Beiträgen</a>
|
||||
<div
|
||||
class="inline-block mx-2 text-xs bg-slate-800 text-white font-bold px-1.5 py-0.5
|
||||
rounded">
|
||||
{{- $model.result.LenContents -}}
|
||||
</div>
|
||||
<i class="ri-arrow-down-double-line"></i>
|
||||
</div>
|
||||
{{- end -}}
|
||||
</h2>
|
||||
{{ range $id, $r := .result.BResult }}
|
||||
<div class="grow-0 max-w-[48rem]">
|
||||
@@ -110,18 +125,47 @@
|
||||
{{ end }}
|
||||
|
||||
{{- if len $model.result.CResult -}}
|
||||
<div class="container-normal mt-0 pt-0" id="almanachcontents">
|
||||
<div class="container-normal mt-16 pt-0" id="almanachcontents">
|
||||
<div class="font-sans border-b">
|
||||
<i class="ri-article-line"></i>
|
||||
{{ if eq $model.result.LenContents 1 }}
|
||||
<b>Ein Beitrag</b>
|
||||
{{- else }}
|
||||
<b>{{- $model.result.LenContents }}</b>
|
||||
Beiträge
|
||||
{{- end }}
|
||||
in
|
||||
{{- if eq (len $model.result.CResult) 1 }}
|
||||
<b>einem Band</b>
|
||||
{{- else }}
|
||||
<b>{{ len $model.result.CResult }}</b> Bänden
|
||||
{{- end }}
|
||||
</div>
|
||||
<div class="mt-8">
|
||||
{{- range $_, $e := $model.result.CResult -}}
|
||||
<div class="font-serif font-bold border-b pb-0.5 mb-2">{{ $e.PreferredTitle }}</div>
|
||||
{{- $contents := index $model.result.Contents $e.Id -}}
|
||||
<div class="mb-7">
|
||||
{{- range $i, $c := $contents -}}
|
||||
{{- $rels := index $model.result.ContentsAgents $c.Id -}}
|
||||
{{- template "_content" Arr $c $e $rels $model.result.Agents false true -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
<tab-list>
|
||||
{{- range $_, $e := $model.result.CResult -}}
|
||||
{{- $contents := index $model.result.Contents $e.Id -}}
|
||||
<div
|
||||
class="font-serif flex flex-row justify-between hover:text-slate-800 text-stone-600
|
||||
font-bold border-b pb-0.5 mb-2 tab-list-head items-end">
|
||||
<div>
|
||||
{{ $e.PreferredTitle }}
|
||||
<i class="ri-arrow-right-s-fill show-closed"></i>
|
||||
<i class="ri-arrow-down-s-fill show-opened"></i>
|
||||
</div>
|
||||
<div
|
||||
class="inline-block font-sans bg-slate-800 text-white h-max text-sm px-1.5 rounded">
|
||||
{{- len $contents -}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-7 hidden tab-list-panel">
|
||||
{{- range $i, $c := $contents -}}
|
||||
{{- $rels := index $model.result.ContentsAgents $c.Id -}}
|
||||
{{- template "_content" Arr $c $e $rels $model.result.Agents false true -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</tab-list>
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
@@ -77,12 +77,18 @@
|
||||
<div class="w-28 ml-4 shrink-0 font-sans text-sm text-right flex flex-row mt-1">
|
||||
{{- if (index $model.bcount $agent.Id) -}}
|
||||
<div class="mr-2">
|
||||
<i class="ri-book-line"></i> {{ index $model.bcount $agent.Id }}
|
||||
<tool-tip position="top">
|
||||
<i class="ri-book-line"></i> {{ index $model.bcount $agent.Id }}
|
||||
<div class="data-tip">Bände</div>
|
||||
</tool-tip>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- if index $model.ccount $agent.Id -}}
|
||||
<div class="">
|
||||
<i class="ri-article-line"></i> {{ index $model.ccount $agent.Id }}
|
||||
<tool-tip position="top">
|
||||
<i class="ri-article-line"></i> {{ index $model.ccount $agent.Id }}
|
||||
<div class="data-tip">Beiträge</div>
|
||||
</tool-tip>
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div id="breadcrumbs">
|
||||
<div>
|
||||
<div>
|
||||
Reihen <i class="ri-arrow-right-wide-line"></i> Einzelansicht
|
||||
<a href="/reihen/?letter={{- First $r.Title -}}" class="">Reihen</a>
|
||||
<i class="ri-arrow-right-wide-line"></i> <b>{{ $r.Title }}</b>
|
||||
</div>
|
||||
<div class="backbutton">
|
||||
|
||||
@@ -77,6 +77,8 @@
|
||||
<label for="almstring" class="col-span-3 align-middle hidden">Almanach-Nummer:</label>
|
||||
<input
|
||||
autocomplete="off"
|
||||
minlength="1"
|
||||
required="true"
|
||||
type="search"
|
||||
name="almstring"
|
||||
id="almstring"
|
||||
@@ -324,3 +326,40 @@
|
||||
<div class="container-normal">Keine Bände gefunden.</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
<script type="module">
|
||||
const form = document.getElementById("simplesearchform");
|
||||
let submitBtn = null;
|
||||
if (form) {
|
||||
submitBtn = form.querySelector("#submitbutton");
|
||||
}
|
||||
|
||||
function checkValidity(f, btn) {
|
||||
if (f.checkValidity()) {
|
||||
btn.disabled = false;
|
||||
} else {
|
||||
btn.disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (form && submitBtn) {
|
||||
checkValidity(form, submitBtn);
|
||||
form.addEventListener("input", (event) => {
|
||||
checkValidity(form, submitBtn);
|
||||
});
|
||||
}
|
||||
|
||||
const lookupform = document.getElementById("lookupform");
|
||||
let lookupsubmitBtn = null;
|
||||
if (lookupform) {
|
||||
lookupsubmitBtn = lookupform.querySelector("#submitbutton");
|
||||
}
|
||||
|
||||
if (lookupform && lookupsubmitBtn) {
|
||||
checkValidity(lookupform, lookupsubmitBtn);
|
||||
lookupform.addEventListener("input", (event) => {
|
||||
checkValidity(lookupform, lookupsubmitBtn);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<div id="searchcontrol" class="container-normal">
|
||||
{{- template "_heading" $model.parameters -}}
|
||||
<div id="" class="border-l border-zinc-300 px-8 py-10 relative">
|
||||
{{- if not $model.parameters.Extended -}}
|
||||
<form
|
||||
id="searchform"
|
||||
class="w-full font-serif"
|
||||
@@ -38,6 +37,10 @@
|
||||
<input type="checkbox" name="annotations" id="annotations" checked />
|
||||
<label for="annotations">Anmerkungen</label>
|
||||
</div>
|
||||
<div class="selectgroup-option">
|
||||
<input type="checkbox" name="year" id="year" checked />
|
||||
<label for="year">Jahr</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{ template "_infotextsimple" true }}
|
||||
</div>
|
||||
|
||||
@@ -22,26 +22,3 @@
|
||||
<i class="ri-arrow-right-long-line"></i> Erweiterte Suche
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
|
||||
<script type="module">
|
||||
const form = document.getElementById("simplesearchform");
|
||||
if (form) {
|
||||
const submitBtn = form.getElementById("submitbutton");
|
||||
}
|
||||
|
||||
function checkValidity() {
|
||||
if (form.checkValidity()) {
|
||||
submitBtn.disabled = false;
|
||||
} else {
|
||||
submitBtn.disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
checkValidity();
|
||||
if (form && submitBtn) {
|
||||
form.addEventListener("input", (event) => {
|
||||
checkValidity();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -16,6 +16,7 @@ const TOOLTIP_ELEMENT = "tool-tip";
|
||||
const ABBREV_TOOLTIPS_ELEMENT = "abbrev-tooltips";
|
||||
const INT_LINK_ELEMENT = "int-link";
|
||||
const POPUP_IMAGE_ELEMENT = "popup-image";
|
||||
const TABLIST_ELEMENT = "tab-list";
|
||||
|
||||
class XSLTParseProcess {
|
||||
#processors;
|
||||
@@ -612,14 +613,20 @@ class PopupImage extends HTMLElement {
|
||||
|
||||
this.overlay.innerHTML = `
|
||||
<div class="relative w-max max-w-dvw max-h-dvh shadow-lg flex flex-col items-center gap-4">
|
||||
<button class="absolute top-0 -right-16 text-white hover:text-gray-300 cursor-pointer focus:outline-none" aria-label="Close popup">
|
||||
<i class="ri-close-fill text-4xl"></i>
|
||||
</button>
|
||||
<div class="absolute -right-16 top-0 text-white text-4xl flex flex-col">
|
||||
<button class="hover:text-gray-300 cursor-pointer focus:outline-none" aria-label="Close popup">
|
||||
<i class="ri-close-fill text-4xl"></i>
|
||||
</button>
|
||||
<tool-tip position="right">
|
||||
<a href="${this._imageURL}" target="_blank" class="text-white no-underline hover:text-gray-300"><i class="ri-file-download-line"></i></a>
|
||||
<div class="data-tip">Bild herunterladen</div>
|
||||
</tool-tip>
|
||||
</div>
|
||||
|
||||
<img
|
||||
src="${this._imageURL}"
|
||||
alt="Popup Image"
|
||||
class="max-h-[90vh] max-w-[80vw] object-contain"
|
||||
class="full max-h-[90vh] max-w-[80vw] object-contain"
|
||||
/>
|
||||
|
||||
<div class="text-center text-gray-700 description-content">
|
||||
@@ -650,6 +657,119 @@ class PopupImage extends HTMLElement {
|
||||
}
|
||||
}
|
||||
|
||||
class Tablist extends HTMLElement {
|
||||
static get observedAttributes() {}
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.shown = -1;
|
||||
this._headings = [];
|
||||
this._contents = [];
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
this._headings = Array.from(this.querySelectorAll(".tab-list-head"));
|
||||
this._contents = Array.from(this.querySelectorAll(".tab-list-panel"));
|
||||
for (let heading of this._headings) {
|
||||
heading.addEventListener("click", this.handleTabClick.bind(this));
|
||||
heading.classList.add("cursor-pointer");
|
||||
heading.classList.add("select-none");
|
||||
heading.setAttribute("role", "button");
|
||||
heading.setAttribute("aria-pressed", "false");
|
||||
heading.setAttribute("tabindex", "0");
|
||||
}
|
||||
|
||||
this.hideDependent();
|
||||
|
||||
if (this._headings.length === 1) {
|
||||
this.expand(0);
|
||||
}
|
||||
}
|
||||
|
||||
expand(index) {
|
||||
if (index < 0 || index >= this._headings.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.shown = index;
|
||||
|
||||
this._contents.forEach((content, i) => {
|
||||
if (i === index) {
|
||||
content.classList.remove("hidden");
|
||||
this._headings[i].setAttribute("aria-pressed", "true");
|
||||
} else {
|
||||
content.classList.add("hidden");
|
||||
this._headings[i].setAttribute("aria-pressed", "false");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
hideDependent() {
|
||||
if (this.shown < 0) {
|
||||
for (const el of this._headings) {
|
||||
this._hideAllDep(el, false);
|
||||
}
|
||||
} else {
|
||||
this._headings.forEach((el, i) => {
|
||||
this._hideAllDep(el, i === this.shown);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
_hideAllDep(element, opened) {
|
||||
const el = element.querySelectorAll(".show-closed");
|
||||
for (let e of el) {
|
||||
if (opened) {
|
||||
e.classList.add("hidden");
|
||||
} else {
|
||||
e.classList.remove("hidden");
|
||||
}
|
||||
}
|
||||
const oel = Array.from(element.querySelectorAll(".show-opened"));
|
||||
for (let e of oel) {
|
||||
if (opened) {
|
||||
e.classList.remove("hidden");
|
||||
} else {
|
||||
e.classList.add("hidden");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
handleTabClick(event) {
|
||||
if (!event.target) {
|
||||
console.warn("Invalid event target");
|
||||
return;
|
||||
}
|
||||
|
||||
const parent = this.findParentWithClass(event.target, "tab-list-head");
|
||||
if (!parent) {
|
||||
console.warn("No parent found with class 'tab-list-head'");
|
||||
return;
|
||||
}
|
||||
|
||||
const index = this._headings.indexOf(parent);
|
||||
if (index === this.shown) {
|
||||
this._contents[index].classList.toggle("hidden");
|
||||
this._headings[index].setAttribute("aria-pressed", "false");
|
||||
this.shown = -1;
|
||||
} else {
|
||||
this.expand(index);
|
||||
}
|
||||
|
||||
this.hideDependent();
|
||||
}
|
||||
|
||||
findParentWithClass(element, className) {
|
||||
while (element) {
|
||||
if (element.classList && element.classList.contains(className)) {
|
||||
return element;
|
||||
}
|
||||
element = element.parentElement;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class AbbreviationTooltips extends HTMLElement {
|
||||
static get observedAttributes() {
|
||||
return ["data-text", "data-abbrevmap"];
|
||||
@@ -855,6 +975,7 @@ customElements.define(ABBREV_TOOLTIPS_ELEMENT, AbbreviationTooltips);
|
||||
customElements.define(FILTER_LIST_ELEMENT, FilterList);
|
||||
customElements.define(SCROLL_BUTTON_ELEMENT, ScrollButton);
|
||||
customElements.define(TOOLTIP_ELEMENT, ToolTip);
|
||||
customElements.define("popup-image", PopupImage);
|
||||
customElements.define(POPUP_IMAGE_ELEMENT, PopupImage);
|
||||
customElements.define(TABLIST_ELEMENT, Tablist);
|
||||
|
||||
export { XSLTParseProcess, FilterList, ScrollButton, AbbreviationTooltips };
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
}
|
||||
|
||||
a {
|
||||
@apply hyphens-none underline decoration-dotted hover:decoration-solid text-slate-700 hover:text-slate-900;
|
||||
@apply hyphens-none underline decoration-dotted hover:decoration-solid text-slate-700 hover:text-slate-900 underline-offset-3;
|
||||
}
|
||||
|
||||
ul {
|
||||
|
||||
Reference in New Issue
Block a user