mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-29 17:25:32 +00:00
Single person page + reihen list
This commit is contained in:
@@ -1,3 +1,169 @@
|
||||
{{ $model := . }}
|
||||
{{ $isGer := false }}
|
||||
{{ $isFra := false }}
|
||||
{{ $isEng := false }}
|
||||
|
||||
{{ $model.entry.TitleStmt }}
|
||||
|
||||
<div class="container-normal" id="">
|
||||
<div class="flex flex-col" id="entrydata">
|
||||
<div class="entryrow">
|
||||
<div class="fieldlabel">Almanach-Nummer</div>
|
||||
<div class="fieldvalue">{{ $model.entry.MusenalmID }}</div>
|
||||
</div>
|
||||
{{- if $model.entry.PreferredTitle -}}
|
||||
<div class="entryrow">
|
||||
<div class="fieldlabel">Kurztitel</div>
|
||||
<div class="fieldvalue">{{ $model.entry.PreferredTitle }}</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- if $model.entry.TitleStmt -}}
|
||||
<div class="entryrow">
|
||||
<div class="fieldlabel">Titel</div>
|
||||
<div class="fieldvalue">{{ $model.entry.TitleStmt }}</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
<div class="entryrow">
|
||||
<div class="fieldlabel">Jahr</div>
|
||||
<div class="fieldvalue">
|
||||
{{- if $model.entry.Year -}}
|
||||
<a href="/reihen?year={{ $model.entry.Year }}&hidden=true">{{ $model.entry.Year }}</a>
|
||||
{{- else -}}
|
||||
[keine Angabe]
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
{{- if $model.entry.ResponsibilityStmt -}}
|
||||
<div class="entryrow">
|
||||
<div class="fieldlabel">Herausgeber</div>
|
||||
<div class="fieldvalue">{{ $model.entry.ResponsibilityStmt }}</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- if $model.entry.Extent -}}
|
||||
<div class="entryrow">
|
||||
<div class="fieldlabel">Umfang</div>
|
||||
<div class="fieldvalue">
|
||||
<abbrev-tooltips data-text="{{ $model.entry.Extent }}"></abbrev-tooltips>
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- if $model.entry.Language -}}
|
||||
<div class="entryrow">
|
||||
<div class="fieldlabel">Sprache</div>
|
||||
<div class="fieldvalue">
|
||||
{{- range $i, $lang := $model.entry.Language -}}
|
||||
{{- if $i -}},{{- end -}}
|
||||
{{- if eq $lang "ger" -}}
|
||||
{{ $isGer = true }}
|
||||
Deutsch
|
||||
{{- else if eq $lang "eng" -}}
|
||||
{{ $isEng = true }}
|
||||
Englisch
|
||||
{{- else if eq $lang "fre" -}}
|
||||
{{ $isFra = true }}
|
||||
Französisch
|
||||
{{- else if eq $lang "ita" -}}
|
||||
Italienisch
|
||||
{{- else if eq $lang "lat" -}}
|
||||
Latein
|
||||
{{- else -}}
|
||||
{{ $lang }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- if $model.entry.References -}}
|
||||
<div class="entryrow">
|
||||
<div class="fieldlabel">Nachweise</div>
|
||||
<div class="fieldvalue">
|
||||
{{- $model.entry.References -}}
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- if $model.series -}}
|
||||
<div class="entryrow">
|
||||
<div class="fieldlabel">Reihen</div>
|
||||
<div class="fieldvalue">
|
||||
{{- range $i, $s := $model.series -}}
|
||||
<div>
|
||||
{{- $rel := index $model.srelations $s.Id -}}
|
||||
{{- if $rel -}}
|
||||
{{- $crel := index $rel 0 -}}
|
||||
{{- if not (eq $crel.Type "Bevorzugter Reihentitel") -}}
|
||||
<span class="text-sm font-sans mr-2">
|
||||
{{- if eq $crel.Type "Früherer Reihentitel" -}}
|
||||
hat Titelauflage s.a.
|
||||
{{- else if eq $crel.Type "Späterer Reihentitel" -}}
|
||||
ist Titelauflage von, s.a.
|
||||
{{- else if eq $crel.Type "In anderer Sprache" -}}
|
||||
{{- if $isFra -}}
|
||||
In deutscher Sprache s.a.
|
||||
{{- else -}}
|
||||
In französischer Sprache s.a.
|
||||
{{- end -}}
|
||||
{{- else if eq $crel.Type "Alternatives Titelblatt" -}}
|
||||
alternatives Titelblatt, s.a.
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<a href="/reihe/{{ $s.MusenalmID }}">{{ $s.Title }}</a>
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- if $model.places -}}
|
||||
<div class="entryrow">
|
||||
<div class="fieldlabel">Orte</div>
|
||||
<div class="fieldvalue">
|
||||
{{- range $i, $p := $model.places -}}
|
||||
<div>
|
||||
<a href="/reihen?place={{ $p.Id }}&hidden=true">{{ $p.Name }}</a>
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- if $model.arelations -}}
|
||||
{{- $rels := index $model.arelations $model.entry.Id -}}
|
||||
<div class="entryrow">
|
||||
<div class="fieldlabel">Personen</div>
|
||||
<div class="fieldvalue">
|
||||
{{- range $i, $r := $rels -}}
|
||||
{{- $a := index $model.agents $r.Agent -}}
|
||||
{{- if $a -}}
|
||||
<div>
|
||||
<a href="/person/{{ $a.Id }}">
|
||||
{{ $a.Name }}
|
||||
</a>
|
||||
<span class="ml-2 px-2 py-0.5 rounded text-sm font-sans bg-slate-200 inline-block">
|
||||
{{- $r.Type -}}
|
||||
</span>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- if $model.entry.Annotation -}}
|
||||
<div class="entryrow">
|
||||
<div class="fieldlabel">Anmerkungen</div>
|
||||
<div class="fieldvalue">
|
||||
{{- Safe $model.entry.Annotation -}}
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="module">
|
||||
let abbrevs = {{- $model.abbrs -}};
|
||||
let ats = document.querySelectorAll('abbrev-tooltips');
|
||||
if (ats) {
|
||||
ats.forEach((at) => {
|
||||
at.setAbbrevMap(abbrevs);
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{{ $bds := index $relations $r.Id }}
|
||||
|
||||
|
||||
<div class="flex flex-col lg:flex-row mb-1.5">
|
||||
<div class="flex flex-col lg:flex-row mb-4">
|
||||
<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 {{ if $markr }}reihen-text{{ end }}">
|
||||
@@ -33,17 +33,14 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grow-0 lg:px-0 ml-3 lg:ml-8 -indent-3">
|
||||
<div class="contents">
|
||||
<div class="grow lg:px-0 ml-3 lg:ml-8">
|
||||
<div class="-indent-3">
|
||||
<span class="font-bold reihen-text">{{ $r.Title }}</span>
|
||||
{{ if $r.Annotation }}
|
||||
<span> · </span>
|
||||
<span class="{{ if $marka }}reihen-text{{ end }}">{{ Safe $r.Annotation }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div></div>
|
||||
<div class="ml-3">
|
||||
{{ template "_reiherelations" (Arr $r $bds $entries false) }}
|
||||
</div>
|
||||
{{ template "_reiherelations" (Arr $r $bds $entries false) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,20 +3,49 @@
|
||||
{{ $entries := index . 2 }}
|
||||
{{ $shownos := index . 3 }}
|
||||
|
||||
{{ if $rels }}
|
||||
{{ range $_, $rel := $rels }}
|
||||
{{ $bd := index $entries $rel.Entry }}
|
||||
{{ if $bd }}
|
||||
<a href="/almanach/{{ $bd.MusenalmID }}">
|
||||
{{ if ne $bd.Year 0 }}
|
||||
{{ $bd.Year }}
|
||||
{{ else }}
|
||||
[o.J.]
|
||||
{{ end }} </a
|
||||
> 
|
||||
{{ if $shownos }}
|
||||
{{ $bd.MusenalmID }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- 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 -}}
|
||||
|
||||
@@ -1,14 +1,57 @@
|
||||
{{ $model := . }}
|
||||
|
||||
{{ if .entries }}
|
||||
<h2>Bände nach Riehentiteln</h2>
|
||||
{{ range $id, $r := .series }}
|
||||
<div>
|
||||
{{ template "_reihe" (Arr $model $r) }}
|
||||
|
||||
<div class="container-normal font-serif">
|
||||
{{ if $model.a.CorporateBody }}
|
||||
<div class="notifier font-sans">
|
||||
<i class="ri-team-line"></i>
|
||||
<span class="filtercategory">Verlag, Druckerei oder Vertrieb</span>
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="notifier font-sans">
|
||||
<i class="ri-user-line"></i>
|
||||
<span class="filtercategory">Person</span>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<div>Keine Bände</div>
|
||||
<h1 class="text-3xl font-bold">{{ $model.a.Name }}</h1>
|
||||
<div>
|
||||
<span class="">
|
||||
{{ $model.a.BiographicalData }}
|
||||
</span>
|
||||
<span class="">
|
||||
{{- $arr := $model.a.ProfessionArray -}}
|
||||
{{- if $arr -}}
|
||||
{{- range $i, $p := $arr -}}
|
||||
<div
|
||||
class="inline-block align-middle bg-slate-200 px-2 font-sans text-sm py-0.5 rounded mx-1">
|
||||
{{- $p -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ if .entries }}
|
||||
<div class="container-normal flex flex-col font-serif mt-7 gap-y-6">
|
||||
<h2>Bände nach Reihentiteln</h2>
|
||||
{{ range $id, $r := .series }}
|
||||
<div class="grow-0 max-w-[48rem]">
|
||||
<div>
|
||||
<span class="font-bold">{{ $r.Title }}</span>
|
||||
</div>
|
||||
{{ if $r.Annotation }}
|
||||
<div class="max-w-[48rem]">
|
||||
<span class="">{{ Safe $r.Annotation }}</span>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="">
|
||||
{{- $bds := index $model.relations $r.Id -}}
|
||||
{{ template "reiherelations" (Arr $r $bds $model.entries true $model.relations) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .contents }}
|
||||
|
||||
51
views/routes/person/components/reiherelations.gohtml
Normal file
51
views/routes/person/components/reiherelations.gohtml
Normal file
@@ -0,0 +1,51 @@
|
||||
{{ $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 -}}
|
||||
@@ -7,25 +7,25 @@
|
||||
|
||||
|
||||
<!-- INFO: 2. Spalten-Layout -->
|
||||
<div class="flex flex-row">
|
||||
<div class="flex flex-row items-stretch">
|
||||
{{ template "alphabet" . }}
|
||||
|
||||
|
||||
<!-- INFO: 3. rechte Spalte -->
|
||||
<div class="w-full">
|
||||
<div class="w-full self-stretch {{ if not .search -}}border-b border-zinc-300{{- end -}}">
|
||||
<!-- 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">
|
||||
<div class="flex flex-row justify-end mt-12">
|
||||
{{ template "professionselectbox" . }}
|
||||
{{ template "searchbox" . }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- INFO: 4. Personenliste -->
|
||||
<div class="mt-7 ml-9 mr-5 font-serif font-lg" id="searchresults">
|
||||
<div class="mt-7 pl-9 pr-5 font-serif font-lg pb-7" id="searchresults">
|
||||
{{ if or .agents .altagents }}
|
||||
{{ if .agents }}
|
||||
<div class="w-full flex flex-col">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{ $model := . }}
|
||||
|
||||
{{- if and $model.letters (not $model.search) -}}
|
||||
<div id="personalphabet" class="flex flex-col text-xl pt-20 relative">
|
||||
<div id="personalphabet" class="flex flex-col text-xl pt-[4.875rem] pb-4 relative">
|
||||
{{- range $id, $r := .letters -}}
|
||||
<a
|
||||
class="{{ if not $model.letter -}}inactive{{- end -}}"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
<div class="ml-12 shrink-0 grow-0 mr-2.5">
|
||||
<div class="min-w-[22.5rem] max-w-96 flex flex-row relative mt-9 ml-auto">
|
||||
<div class="min-w-[22.5rem] max-w-96 flex flex-row relative ml-auto">
|
||||
<div class="">
|
||||
<i class="ri-search-line"></i><i class="-ml-0.5 inline-block ri-arrow-right-s-line"></i>
|
||||
</div>
|
||||
@@ -19,8 +19,8 @@
|
||||
hx-sync="this:replace"
|
||||
hx-select="#searchresults"
|
||||
hx-target="#searchresults"
|
||||
hx-swap="outerHTML"
|
||||
autocomplete="off"
|
||||
{{ if $model.active }}autofocus="true"{{ end }}
|
||||
{{ if $model.search }}disabled="true"{{ end }} />
|
||||
</div>
|
||||
<div id="permalink" class="font-serif ml-3 min-w-7 pb-1">
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<h1 class="heading">Bände nach Reihentiteln</h1>
|
||||
{{ template "notifier" . }}
|
||||
|
||||
{{ if not .search }}
|
||||
{{ if not (or .search .hidden) }}
|
||||
<div class="mt-2">
|
||||
{{ template "alphabet" Dict "active" .letter "letters" .letters "search" .search }}
|
||||
</div>
|
||||
@@ -22,8 +22,13 @@
|
||||
</div>
|
||||
|
||||
<!-- INFO: 2. Breite Anzeige -->
|
||||
<div class="container-oversize mt-4">
|
||||
{{ if not .search }}
|
||||
<div
|
||||
class="{{ if or .search .hidden }}
|
||||
container-normal
|
||||
{{ else }}
|
||||
container-oversize
|
||||
{{ end }} mt-4">
|
||||
{{ if not (or .search .hidden) }}
|
||||
{{ template "filter" . }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
hx-select="#searchcontent"
|
||||
hx-target="#searchcontent"
|
||||
autocomplete="off"
|
||||
{{ if $model.active }}autofocus="true"{{ end }}
|
||||
{{ if $model.search }}disabled="true"{{ end }} />
|
||||
</div>
|
||||
<div id="permalink" class="font-serif ml-3 min-w-7 pb-1">
|
||||
|
||||
@@ -9,12 +9,14 @@
|
||||
text-zinc-800">
|
||||
Suche nach:
|
||||
</div>
|
||||
<!--
|
||||
<a
|
||||
href="/suche/reihen"
|
||||
class="block no-underline"
|
||||
{{ if eq $model.type "reihen" }}aria-current="page"{{- end -}}
|
||||
>Reihen</a
|
||||
>
|
||||
-->
|
||||
<a
|
||||
href="/suche/baende"
|
||||
class="block no-underline"
|
||||
@@ -27,12 +29,14 @@
|
||||
{{ if eq $model.type "beitraege" }}aria-current="page"{{- end -}}
|
||||
>Beiträgen</a
|
||||
>
|
||||
<!--
|
||||
<a
|
||||
href="/suche/personen"
|
||||
class="block no-underline"
|
||||
{{ if eq $model.type "personen" }}aria-current="page"{{- end -}}
|
||||
>Personen</a
|
||||
>
|
||||
-->
|
||||
</nav>
|
||||
<h1
|
||||
class="text-3xl font-bold px-3 relative translate-y-[45%] w-min whitespace-nowrap
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
{{ if $model.q }}value="{{ $model.q }}"{{- end -}}
|
||||
type="search"
|
||||
name="q"
|
||||
autofocus="true"
|
||||
minlength="3"
|
||||
required
|
||||
placeholder="Suchbegriff (min. 3 Zeichen)"
|
||||
|
||||
Reference in New Issue
Block a user