Refactored Series List

This commit is contained in:
Simon Martens
2025-02-25 23:46:03 +01:00
parent 0a9e71d4e3
commit 3e1f5a2983
6 changed files with 385 additions and 614 deletions

View File

@@ -2,7 +2,7 @@
<div
class="hidden lg:flex min-w-[32rem] max-w-[32rem] float-right ml-6 flex-col gap-y-8 [&>*]:pb-12
[&>*]:px-12 [&>*]:pt-8 [&>*]:bg-slate-100">
{{ if .agents }}
{{ if $model.common.Agents }}
<div class="">
<h2 class="mb-6">Herausgeber:innen, Verlage &amp; Druckereien</h2>
<filter-list
@@ -13,7 +13,7 @@
<script type="module">
let agentList = document.getElementById("agent-list");
if (agentList) {
agentList.items = {{ .agents }};
agentList.items = {{ $model.common.Agents }};
agentList.setSearchTextFunc((item) => {
return item.name;
@@ -31,7 +31,7 @@
</script>
{{ end }}
{{ if .places }}
{{ if $model.common.Places }}
<div>
<h2 class="mb-6">Erscheinungsorte</h2>
<filter-list
@@ -41,11 +41,11 @@
</div>
<script type="module">
let placeList = document.getElementById("place-list");
if (placeList) placeList.items = {{ .places }};
if (placeList) placeList.items = {{ $model.common.Places }};
</script>
{{ end }}
{{ if .years }}
{{ if $model.common.Years }}
<div>
<h2 class="mb-6">Geltungsjahre</h2>
<filter-list
@@ -57,7 +57,7 @@
<script type="module">
let yearList = document.getElementById("year-list");
if (yearList) {
yearList.items = {{ .years }};
yearList.items = {{ $model.common.Years }};
yearList.setHREFFunc((item) => {
return String(item);