Allerhand Kleinigkeiten; Einzelansichten Reihen u Personen; Bandansicht

This commit is contained in:
Simon Martens
2025-02-25 02:39:29 +01:00
parent 6b5fa3dbc3
commit 24f1e4fd55
33 changed files with 843 additions and 154 deletions

File diff suppressed because one or more lines are too long

View File

@@ -33,7 +33,7 @@
<body class="w-full text-lg" hx-ext="response-targets" hx-boost="true">
<div class="flex flex-col min-h-screen w-full">
<header class="container-normal" id="header">
<header class="container-normal pb-0" id="header">
{{ block "_menu" . }}
<!-- Default app menu... -->
{{ end }}

View File

@@ -4,7 +4,35 @@
{{ $isEng := false }}
<div class="container-normal" id="">
<div id="breadcrumbs">
{{- range $i, $s := $model.series -}}
<div>
<div class="{{ if $i -}}opacity-0 pointer-events-none select-none{{- end -}}">
Reihentitel <i class="ri-arrow-right-wide-line"></i>
</div>
<div>
<a href="/reihe/{{- $s.MusenalmID -}}">{{ $s.Title }}</a>
</div>
<div>
{{- if $model.entry.Year -}}
<i class="ri-arrow-right-wide-line"></i> <b>{{ $model.entry.Year }}</b>
{{- else -}}
<i class="ri-arrow-right-wide-line"></i> <b>{{ $model.entry.PreferredTitle }}</b>
{{- end -}}
</div>
<div class="grow"></div>
{{- if not $i -}}
<div class="backbutton">
<a href="/reihen/?letter=A" class="no-underline">
<i class="ri-arrow-left-long-line"></i> Alle Bände nach Reihentiteln
</a>
</div>
{{- end -}}
</div>
{{- end -}}
</div>
<div class="container-normal mt-12" id="">
<div class="flex flex-col" id="entrydata">
<div class="entryrow">
<div class="fieldlabel">Almanach-Nummer</div>
@@ -150,7 +178,7 @@
<div class="entryrow">
<div class="fieldlabel">Anmerkungen</div>
<div class="fieldvalue">
{{- Safe $model.entry.Annotation -}}
{{- Safe (ReplaceSlashParen $model.entry.Annotation) -}}
</div>
</div>
{{- end -}}

View File

@@ -35,7 +35,9 @@
</div>
<div class="grow lg:px-0 ml-3 lg:ml-8">
<div class="-indent-3">
<span class="font-bold reihen-text">{{ $r.Title }}</span>
<span class="font-bold reihen-text">
{{ $r.Title }}
</span>
{{ if $r.Annotation }}
<span>&ensp;&middot;&ensp;</span>
<span class="{{ if $marka }}reihen-text{{ end }}">{{ Safe $r.Annotation }}</span>

View File

@@ -11,7 +11,7 @@
{{- if $bd -}}
<div class="flex flex-row odd:bg-zinc-100 px-3 ml-2 py-0.5 justify-between w-full">
<a href="/almanach/{{ $bd.MusenalmID }}" class="no-underline">
<div class="">
<div class="{{- if eq $bd.EditState "Edited" -}}font-bold{{- end -}}">
{{- if $bd.PreferredTitle -}}
{{ $bd.PreferredTitle }}
{{- else if ne $bd.Year 0 -}}

View File

@@ -1 +1 @@
<title>{{ .site.title }} &ndash; {{ .record.title }}</title>
<title>{{ .site.title }} &ndash; {{ .record.Title }}</title>

View File

@@ -1,25 +1,54 @@
{{/* .result:
type AgentResult struct {
Agent *dbmodels.Agent
BResult []*dbmodels.Series // Sorted
Entries map[string]*dbmodels.Entry // KEY: Entry ID
EntriesSeries map[string][]*dbmodels.REntriesSeries // KEY: Series ID
EntriesAgents map[string][]*dbmodels.REntriesAgents // KEY: Entry ID
CResult []*dbmodels.Entry /// Sorted
Contents map[string][]*dbmodels.Content // KEY: entry ID
ContentsAgents map[string][]*dbmodels.RContentsAgents // KEY: Content ID
}
*/}}
{{ $model := . }}
<div class="container-normal font-serif">
{{ if $model.a.CorporateBody }}
<div class="notifier font-sans">
<div id="breadcrumbs">
<div>
<div>
Personen und Körperschaften <i class="ri-arrow-right-wide-line"></i> Einzelansicht
<i class="ri-arrow-right-wide-line"></i> <b>{{ $model.result.Agent.Name }}</b>
</div>
<div class="backbutton">
<a href="/personen/" class="no-underline">
<i class="ri-arrow-left-long-line"></i> Alle Personen &amp; Körperschaften
</a>
</div>
</div>
</div>
<div class="container-normal font-serif mt-12">
{{ if $model.result.Agent.CorporateBody }}
<div class="font-sans">
<i class="ri-team-line"></i>
<span class="filtercategory">Verlag, Druckerei oder Vertrieb</span>
<span class="filtercategory">Körperschaft</span>
</div>
{{ else }}
<div class="notifier font-sans">
<div class="font-sans">
<i class="ri-user-line"></i>
<span class="filtercategory">Person</span>
</div>
{{ end }}
<h1 class="text-3xl font-bold">{{ $model.a.Name }}</h1>
<h1 class="text-3xl font-bold">{{ $model.result.Agent.Name }}</h1>
<div>
<span class="">
{{ $model.a.BiographicalData }}
{{ $model.result.Agent.BiographicalData }}
</span>
<span class="">
{{- $arr := $model.a.ProfessionArray -}}
{{- $arr := $model.result.Agent.ProfessionArray -}}
{{- if $arr -}}
{{- range $i, $p := $arr -}}
<div
@@ -32,10 +61,25 @@
</div>
</div>
{{ if .entries }}
{{- if .result.BResult -}}
<div class="container-normal flex flex-col font-serif mt-7 gap-y-6">
<h2>Bände nach Reihentiteln</h2>
{{ range $id, $r := .series }}
<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>
{{ range $id, $r := .result.BResult }}
<div class="grow-0 max-w-[48rem]">
<div>
<span class="font-bold">{{ $r.Title }}</span>
@@ -46,14 +90,18 @@
</div>
{{ end }}
<div class="">
{{- $bds := index $model.relations $r.Id -}}
{{ template "reiherelations" (Arr $r $bds $model.entries true $model.relations) }}
{{- $bds := index $model.result.EntriesSeries $r.Id -}}
{{ template "personreiherelations" (Arr $r $bds $model.result.Entries true
$model.result.EntriesAgents)
}}
</div>
</div>
{{ end }}
</div>
{{ end }}
<!--
{{ if .contents }}
<h2>Inhalte</h2>
{{ range $id, $c := .contents }}
@@ -65,3 +113,4 @@
</div>
{{ end }}
{{ end }}
-->

View File

@@ -1,51 +0,0 @@
{{ $reihe := index . 0 }}
{{ $rels := index . 1 }}
{{ $entries := index . 2 }}
{{ $shownos := index . 3 }}
{{- if $rels -}}
<div class="reiherelations flex flex-col text-base font-sans w-full pt-1 -ml-3">
{{- range $_, $rel := $rels -}}
{{- $bd := index $entries $rel.Entry -}}
{{- if $bd -}}
<div class="flex flex-row odd:bg-zinc-100 px-3 py-0.5 justify-between w-full">
<a href="/almanach/{{ $bd.MusenalmID }}" class="no-underline">
<div class="">
{{- if $bd.PreferredTitle -}}
{{ $bd.PreferredTitle }}
{{- else if ne $bd.Year 0 -}}
{{- $bd.Year -}}
{{- else -}}
[o.J.]
{{- end -}}
</div>
{{- if not (eq $rel.Type "Bevorzugter Reihentitel") -}}
<div class="text-xs whitespace-nowrap">
{{- if eq $rel.Type "Früherer Reihentitel" -}}
Titelauflage aus einer anderen Reihe
{{- else if eq $rel.Type "Späterer Reihentitel" -}}
Titelauflage
{{- else if eq $rel.Type "In anderer Sprache" -}}
{{- if Contains $bd.Language "ger" -}}
In deutscher Sprache
{{- else -}}
In französischer Sprache
{{- end -}}
{{- else -}}
{{ $rel.Type }}
{{- end -}}
</div>
{{- end -}}
</a>
<div class="whitespace-nowrap align-top">
Alm
{{ $bd.MusenalmID }}
</div>
</div>
{{- end -}}
{{- end -}}
</div>
{{- end -}}

View File

@@ -0,0 +1,4 @@
<title>
{{ .site.title }} &ndash;
{{ if .result -}}{{ .result.Agent.Name }}{{ else -}}Einzelpersonenansicht{{- end -}}
</title>

View File

@@ -0,0 +1,70 @@
{{ $reihe := index . 0 }}
{{ $rels := index . 1 }}
{{ $entries := index . 2 }}
{{ $shownos := index . 3 }}
{{ $relations := index . 4 }}
{{- if $rels -}}
<div class="reiherelations flex flex-col text-base font-sans w-full pt-1 -ml-3">
{{- range $_, $rel := $rels -}}
{{- $bd := index $entries $rel.Entry -}}
{{- $arels := index $relations $rel.Entry -}}
{{- if $bd -}}
<div class="flex flex-row odd:bg-zinc-100 pr-3 py-0.5 w-full items-start">
{{- if $arels -}}
<div class="min-w-32">
{{- range $i, $arel := $arels -}}
<div
class="inline font-bold text-sm font-sans bg-slate-200 pl-2 pr-3 py-0.5
rounded-r-full mr-1.5 ">
{{- $arel.Type -}}
</div>
{{- end -}}
</div>
{{- end -}}
<div>
<a
href="/almanach/{{ $bd.MusenalmID }}"
class="no-underline {{ if eq
$bd.EditState "Edited"
-}}
font-bold
{{- end -}}">
{{- if $bd.PreferredTitle -}}
{{ $bd.PreferredTitle }}
{{- else if ne $bd.Year 0 -}}
{{- $bd.Year -}}
{{- else -}}
[o.J.]
{{- end -}}
{{- if not (eq $rel.Type "Bevorzugter Reihentitel") -}}
<div class="text-xs whitespace-nowrap">
{{- if eq $rel.Type "Früherer Reihentitel" -}}
Titelauflage aus einer anderen Reihe
{{- else if eq $rel.Type "Späterer Reihentitel" -}}
Titelauflage
{{- else if eq $rel.Type "In anderer Sprache" -}}
{{- if Contains $bd.Language "ger" -}}
In deutscher Sprache
{{- else -}}
In französischer Sprache
{{- end -}}
{{- else -}}
{{ $rel.Type }}
{{- end -}}
</div>
{{- end -}}
</a>
</div>
<div class="whitespace-nowrap align-top grow text-right">
Alm
{{ $bd.MusenalmID }}
</div>
</div>
{{- end -}}
{{- end -}}
</div>
{{- end -}}

View File

@@ -16,9 +16,8 @@
<!-- INFO: 4. Header -->
<div id="personheader" class="border-t border-r border-zinc-300 relative w-full">
{{ template "heading" . }}
<div class="flex flex-row justify-end mt-12">
<div class="flex flex-row justify-end mt-12 items-end">
{{ template "notifier" . }}
{{ template "professionselectbox" . }}
{{ template "searchbox" . }}
</div>
@@ -35,7 +34,11 @@
<a href="/person/{{ $agent.Id }}" class="search-result font-bold">
{{ $agent.Name }}
</a>
<span class="inline-block font-sans text-sm">
<span
class="inline-block font-sans text-sm
{{ if $model.FTS -}}
search-result
{{- end -}}">
{{ if not $agent.CorporateBody }}
{{ $agent.BiographicalData }}
{{ end }}
@@ -68,7 +71,9 @@
{{- end -}}
</div>
<div class="w-64 ml-4 shrink-0">{{ $agent.References }}</div>
<div class="w-64 ml-4 shrink-0 {{ if $model.FTS -}}search-result{{- end -}}">
{{ $agent.References }}
</div>
</div>
{{ end }}

View File

@@ -1,7 +1,7 @@
{{ $model := . }}
{{- if and $model.letters (not $model.search) -}}
<div id="personalphabet" class="flex flex-col text-xl pt-[4.875rem] pb-4 relative">
<div id="personalphabet" class="flex flex-col text-xl pt-[5.875rem] pb-4 relative">
{{- range $id, $r := .letters -}}
<a
class="{{ if not $model.letter -}}inactive{{- end -}}"

View File

@@ -7,14 +7,16 @@
{{ $isOrg := and $model.filter (eq $model.filter "org") }}
<h1
class="text-3xl font-bold px-3 relative -translate-y-[55%] w-min whitespace-nowrap bg-stone-50 ml-24 z-20">
<span x-show="!search">
{{- if $isPerson -}}
Personen
{{- else if $isOrg -}}
Verlage, Druckereien &amp; Vertriebe
{{- end -}}
</span>
<span x-show="search"> Suche &middot; Alle Personen &amp; Körperschaften </span>
</h1>
<div>
<h1
class="text-3xl font-bold px-3 relative -translate-y-[55%] w-min whitespace-nowrap bg-stone-50 ml-24 z-20">
<span x-show="!search">
{{- if $isPerson -}}
Personen
{{- else if $isOrg -}}
Verlage, Druckereien &amp; Vertriebe
{{- end -}}
</span>
<span x-show="search"> Suche &middot; Alle Personen &amp; Körperschaften </span>
</h1>
</div>

View File

@@ -0,0 +1,91 @@
{{ $model := . }}
{{ $isPerson := and $model.filter (or (eq $model.filter "noorg") (eq $model.filter "musik") (eq $model.filter "autor") (eq $model.filter "graphik") (eq $model.filter "hrsg")) }}
{{ $isProfession := and $model.filter (or (eq $model.filter "musik") (eq $model.filter "autor") (eq $model.filter "graphik") (eq $model.filter "hrsg")) }}
{{ $isNoOrg := and $model.filter (eq $model.filter "noorg") }}
{{ $isOrg := and $model.filter (eq $model.filter "org") }}
{{ $isMusik := and $model.filter (eq $model.filter "musik") }}
{{ $isAutor := and $model.filter (eq $model.filter "autor") }}
{{ $isGraphik := and $model.filter (eq $model.filter "graphik") }}
{{ $isHrsg := and $model.filter (eq $model.filter "hrsg") }}
<div class="justify-self-start grow flex flex-row px-3 ml-6 mt-2 mr-2">
{{ if .letter }}
{{- if $isNoOrg -}}
<div class="notifier" x-show="!search">
<i class="ri-sort-alphabet-asc"></i>
<span class="filtercategory">Alle Personen</span> &middot;
<span class="">Anfangsbuchstabe <span class="filterterm">{{ .letter }}</span></span>
</div>
{{- else if $isMusik -}}
<div class="notifier" x-show="!search">
<i class="ri-sort-alphabet-asc"></i>
<span class="filtercategory">Musiker:innen</span> &middot;
<span class="">Anfangsbuchstabe <span class="filterterm">{{ .letter }}</span></span>
</div>
{{- else if $isAutor -}}
<div class="notifier" x-show="!search">
<i class="ri-sort-alphabet-asc"></i>
<span class="filtercategory">Autor:innen</span> &middot;
<span class="">Anfangsbuchstabe <span class="filterterm">{{ .letter }}</span></span>
</div>
{{- else if $isGraphik -}}
<div class="notifier" x-show="!search">
<i class="ri-sort-alphabet-asc"></i>
<span class="filtercategory">Graphiker:innen</span> &middot;
<span class="">Anfangsbuchstabe <span class="filterterm">{{ .letter }}</span></span>
</div>
{{- else if $isHrsg -}}
<div class="notifier" x-show="!search">
<i class="ri-sort-alphabet-asc"></i>
<span class="filtercategory">Herausgeber:innen</span> &middot;
<span class="">Anfangsbuchstabe <span class="filterterm">{{ .letter }}</span></span>
</div>
{{- else if $isOrg -}}
<div class="notifier" x-show="!search">
<i class="ri-sort-alphabet-asc"></i>
<span class="filtercategory">Verlage, Druckereien &amp; Vertriebe</span> &middot;
<span class="">Anfangsbuchstabe <span class="filterterm">{{ .letter }}</span></span>
</div>
{{- end -}}
{{ end }}
<div class="notifier" x-show="search">
<i class="ri-search-line"></i>
<span class="filtercategory">Suche</span>
&middot; <span class="filterterm" x-text="search"></span>
</div>
{{ if .search }}
<div class="notifier" x-show="search">
<i class="ri-links-line"></i>
<span class="filtercategory">Link</span>
&middot; <span class="filterterm" x-text="window.location.href"></span>
</div>
{{ end }}
{{ if or (not .letter) $isProfession }}
<div class="notifier ml-2" x-show="!search">
<a href="/personen/" class="no-underline">
<i class="ri-arrow-left-long-line"></i> Alle Personen
</a>
</div>
{{ end }}
<div class="notifier ml-2" x-show="search">
<a href="/personen/" class="no-underline">
<i class="ri-arrow-left-long-line"></i> Alle Personen
</a>
</div>
</div>

View File

@@ -2,22 +2,61 @@
{{ $r := $model.series }}
<div class="container-normal flex flex-col font-serif mt-16">
<div class="grow-0 max-w-[48rem]">
<div id="breadcrumbs">
<div>
<div>
<span class="font-bold">{{ $r.Title }}</span>
Reihen <i class="ri-arrow-right-wide-line"></i> Einzelansicht
<i class="ri-arrow-right-wide-line"></i> <b>{{ $r.Title }}</b>
</div>
<div class="backbutton">
<a href="/reihen/?letter=A" class="no-underline">
<i class="ri-arrow-left-long-line"></i> Alle Reihen
</a>
</div>
</div>
</div>
<div class="container-normal flex flex-col font-serif mt-12">
<div class="font-sans">
<svg
class="w-[0.9rem] h-[0.9rem] relative bottom-[0.04rem] inline-block"
width="65px"
height="65px"
viewBox="0 0 28 28"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
fill="currentColor">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<g id="🔍-Product-Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="ic_fluent_library_28_filled" fill="currentColor" fill-rule="nonzero">
<path
d="M5.9897,3 C7.0937,3 7.9897,3.896 7.9897,5 L7.9897,23 C7.9897,24.104 7.0937,25 5.9897,25 L4.0007,25 C2.8957,25 2.0007,24.104 2.0007,23 L2.0007,5 C2.0007,3.896 2.8957,3 4.0007,3 L5.9897,3 Z M12.9897,3 C14.0937,3 14.9897,3.896 14.9897,5 L14.9897,23 C14.9897,24.104 14.0937,25 12.9897,25 L10.9947,25 C9.8897,25 8.9947,24.104 8.9947,23 L8.9947,5 C8.9947,3.896 9.8897,3 10.9947,3 L12.9897,3 Z M22.0701,6.5432 L25.9301,22.0262 C26.1971,23.0972 25.5441,24.1832 24.4731,24.4512 L22.5101,24.9402 C21.4391,25.2072 20.3531,24.5552 20.0861,23.4832 L16.2261,8.0002 C15.9581,6.9282 16.6111,5.8432 17.6821,5.5752 L19.6451,5.0862 C20.7161,4.8182 21.8021,5.4712 22.0701,6.5432 Z"
id="🎨-Color"></path>
</g>
</g>
</g>
</svg>
Reihe
</div>
<div class="grow-0">
<div>
<span class="font-bold text-3xl mr-2">{{ $r.Title }}</span>
{{ if $r.References }}
<div class="text-sm font-sans px-2 py-1 ml-2 bg-stone-100 w-max inline-block">
<div class="text-sm font-sans px-2 py-1 bg-stone-100 w-max inline-block mr-2">
{{ $r.References }}
</div>
{{ end }}
</div>
{{ if $r.Annotation }}
<div class="max-w-[48rem]">
<div class="max-w-[48rem] mt-1">
<span class="">{{ Safe $r.Annotation }}</span>
</div>
{{ end }}
<div class="">
<div class="max-w-[64rem] [&_*]:!text-lg mt-6">
{{ template "_reiherelations" (Arr $r $model.relations $model.entries true) }}
</div>
</div>

View File

@@ -56,7 +56,7 @@
{{ if not .letter }}
<div class="notifier ml-2" x-show="!search">
<a href="/reihen" class="no-underline">
<a href="/reihen/?letter=A" class="no-underline">
<i class="ri-arrow-left-long-line"></i> Alle Reihen anzeigen
</a>
</div>
@@ -64,7 +64,7 @@
<div class="notifier ml-2" x-show="search">
<a href="/reihen" class="no-underline">
<a href="/reihen/?letter=A" class="no-underline">
<i class="ri-arrow-left-long-line"></i> Alle Reihen anzeigen
</a>
</div>

View File

@@ -121,6 +121,13 @@
@apply !text-gray-400;
}
#alphabet a[aria-current="page"]:not(.inactive):before {
aspect-ratio: 1;
clip-path: polygon(100% 80%, 80% 100%, 100% 100%);
content: " ";
@apply bg-red-600 absolute -bottom-[1px] -right-[1px] h-full z-30;
}
.headingcontainer:before {
content: "";
@apply bg-zinc-300 w-[50%] absolute top-0 left-[50%] h-[1px];
@@ -138,15 +145,15 @@
@apply border-l-4 border-zinc-300 font-bold;
}
.headingcontainer .notifier {
.notifier {
@apply bg-stone-100 text-center text-base px-2.5 py-1 font-sans rounded;
}
.headingcontainer .notifier i {
.notifier i {
@apply inline-block pr-0.5;
}
.headingcontainer .notifier .filterterm {
.notifier .filterterm {
@apply font-bold;
}
@@ -289,11 +296,11 @@
}
#persontype a {
@apply px-1.5 border-b-[5px] border-zinc-300 no-underline font-serif mx-2.5;
@apply px-1.5 border-b-[5px] border-transparent hover:border-zinc-200 no-underline font-serif mx-2.5;
}
#persontype a[aria-current="page"]:not(#persontype.inactive a) {
@apply font-bold;
@apply font-bold border-zinc-300;
}
#persontype.inactive a {
@@ -326,15 +333,15 @@
}
#personalphabet a:hover:not([aria-current="page"]:not(.inactive)) {
@apply !bg-stone-50 -ml-2 relative;
@apply !bg-stone-50 -ml-2 relative text-stone-900;
}
#personalphabet a.inactive {
@apply !text-gray-400;
@apply text-gray-400;
}
#entrydata .fieldlabel {
@apply font-bold text-base font-sans whitespace-nowrap w-60 grow-0 shrink-0 pt-0.5;
@apply font-bold text-base font-sans whitespace-nowrap min-w-48 grow-0 shrink-0 pt-0.5;
}
#entrydata .fieldvalue {
@@ -342,7 +349,7 @@
}
#entrydata .entryrow {
@apply flex flex-row gap-x-3.5 items-start py-0.5 px-4;
@apply flex flex-row gap-x-3.5 items-start py-0.5;
}
#entrydata {
@@ -351,4 +358,16 @@
int-link {
@apply text-slate-700 hover:text-slate-900 underline decoration-dotted hover:decoration-solid;
}
#breadcrumbs {
@apply w-full max-w-(--breakpoint-xl) mx-auto px-3 pb-4 relative pt-1.5;
}
#breadcrumbs > div {
@apply flex flex-row gap-x-2.5 justify-between;
}
#breadcrumbs .backbutton {
@apply ml-4 bg-stone-100 py-0.5 px-2.5 rounded font-sans text-base text-center mr-1.5;
}
}