mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-29 17:25:32 +00:00
more bugs fixed, more bugs created
This commit is contained in:
@@ -37,9 +37,10 @@
|
||||
name="search"
|
||||
value="{{ $model.search }}"
|
||||
x-model="search"
|
||||
placeholder="Almanach-Nr od. Suchbegriff"
|
||||
placeholder="Almanach-Nr oder Suchbegriff"
|
||||
hx-get=""
|
||||
hx-trigger="input changed delay:=200ms, keyup[key=='Enter']"
|
||||
hx-trigger="input changed delay=1000ms, keyup[key=='Enter']"
|
||||
hx-sync="this:replace"
|
||||
hx-select="#searchcontent"
|
||||
hx-target="#searchcontent"
|
||||
autocomplete="off" />
|
||||
|
||||
@@ -1,26 +1,40 @@
|
||||
{{ $model := index . 0 }}
|
||||
{{ $r := index . 1 }}
|
||||
|
||||
{{ $bds := index $model.relations $r.Id }}
|
||||
|
||||
|
||||
<div class="flex flex-row mb-1.5">
|
||||
<div class="grow-0 shrink-0 w-[12rem] flex flex-col">
|
||||
{{ if $r.References }}
|
||||
<div class="text-sm font-sans px-2 py-1 bg-stone-100">{{ $r.References }}</div>
|
||||
{{ end }}
|
||||
{{ if $model.musenalmid }}
|
||||
{{ range $_, $rel := $bds }}
|
||||
<div class="font-sans text-sm px-2 py-1 bg-stone-100 searchable my-0.5">
|
||||
Almanach-Nr.
|
||||
{{ (index $model.entries
|
||||
$rel.Entry).MusenalmID
|
||||
}}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="font-sans py-0.5 text-xs">
|
||||
<a href="/reihe/?={{ $r.Id }}" class="no-underline rounded bg-stone-100 px-1.5">
|
||||
<a href="/reihe/{{ $r.MusenalmID }}" class="no-underline rounded bg-stone-100 px-1.5">
|
||||
<i class="ri-links-line"></i> Permalink
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grow-0 ml-8 -indent-3">
|
||||
<span class="font-bold">{{ $r.Title }}</span>
|
||||
{{ if $r.Annotation }}
|
||||
<span> · </span>
|
||||
<span class="">{{ Safe $r.Annotation }}</span>
|
||||
{{ end }}
|
||||
<div class="reihen-text contents">
|
||||
<span class="font-bold">{{ $r.Title }}</span>
|
||||
{{ if $r.Annotation }}
|
||||
<span> · </span>
|
||||
<span class="">{{ Safe $r.Annotation }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div></div>
|
||||
<div class="ml-3">
|
||||
{{ $bds := index $model.relations $r.Id }}
|
||||
{{ if $bds }}
|
||||
{{ range $_, $rel := $bds }}
|
||||
{{ $bd := index $model.entries $rel.Entry }}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{{ $model := . }}
|
||||
<div
|
||||
class="min-w-[32rem] max-w-[32rem] float-right ml-6 flex flex-col gap-y-8 [&>*]:py-12
|
||||
[&>*]:px-12 -mr-36 [&>*]:bg-slate-100">
|
||||
class="min-w-[32rem] max-w-[32rem] float-right ml-6 flex flex-col gap-y-8 [&>*]:pb-12
|
||||
[&>*]:px-12 [&>*]:pt-8 -mr-36 [&>*]:bg-slate-100">
|
||||
{{ if .agents }}
|
||||
<div class="">
|
||||
<h2 class="mb-6">Personen, Verlage & Druckereien</h2>
|
||||
<filter-list
|
||||
id="agent-list"
|
||||
data-url="/reihen/?agent="
|
||||
@@ -32,6 +33,7 @@
|
||||
|
||||
{{ if .places }}
|
||||
<div>
|
||||
<h2 class="mb-6">Erscheinungsorte</h2>
|
||||
<filter-list
|
||||
id="place-list"
|
||||
data-url="/reihen/?place="
|
||||
@@ -45,11 +47,12 @@
|
||||
|
||||
{{ if .years }}
|
||||
<div>
|
||||
<h2 class="mb-6">Geltungsjahre</h2>
|
||||
<filter-list
|
||||
id="year-list"
|
||||
data-url="/reihen/?year="
|
||||
data-filterstart="true"
|
||||
data-placeholder="Erscheinungsjahr filtern..."></filter-list>
|
||||
data-placeholder="Nach Geltungsjahren filtern..."></filter-list>
|
||||
</div>
|
||||
<script type="module">
|
||||
let yearList = document.getElementById("year-list");
|
||||
|
||||
@@ -13,22 +13,43 @@
|
||||
</div>
|
||||
|
||||
<div id="searchcontent" class="font-serif">
|
||||
<div class="-ml-16">
|
||||
{{ if or .series .altseries }}
|
||||
<div class="mb-1 max-w-[60rem] hyphens-auto">
|
||||
{{ range $id, $r := .series }}
|
||||
{{ template "_reihe" (Arr $model $r) }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ if $model.search }}
|
||||
<script type="module">
|
||||
let elements = document.querySelectorAll('.reihen-text');
|
||||
let mark_instance = new Mark(elements);
|
||||
// INFO: we wait a little bit before marking, to settle everything
|
||||
setTimeout(() => {
|
||||
mark_instance.mark('{{ $model.search }}', {
|
||||
"seperateWordSearch": true,
|
||||
});
|
||||
}, 200);
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
{{ if .search }}
|
||||
<div class="mt-8 max-w-96">
|
||||
{{ range $id, $r := .altseries }}
|
||||
{{ template "_reihe" (Arr $model $r) }}
|
||||
{{ if or .series .altseries }}
|
||||
<div class="-ml-16">
|
||||
<div class="mb-1 max-w-[60rem] hyphens-auto">
|
||||
{{ range $id, $r := .series }}
|
||||
{{ template "_reihe" (Arr $model $r) }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if and .search .altseries }}
|
||||
{{ if .series }}
|
||||
<div class="border-b text-xs font-sans text-right pb-0.5">
|
||||
Treffer in Reihentiteln ↑
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="border-t mb-1.5 text-xs font-sans text-right pt-0.5">
|
||||
Treffer in Anmerkungen, Verweisen etc. ↓
|
||||
</div>
|
||||
<div class="mb-1 max-w-[60rem] hyphens-auto">
|
||||
{{ range $id, $r := .altseries }}
|
||||
{{ template "_reihe" (Arr $model $r) }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="mt-8">
|
||||
Keine Reihen
|
||||
|
||||
Reference in New Issue
Block a user