mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-30 01:35:32 +00:00
Single person page + reihen list
This commit is contained in:
@@ -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 -}}
|
||||
Reference in New Issue
Block a user