mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-28 16:45:32 +00:00
100 lines
3.6 KiB
Plaintext
100 lines
3.6 KiB
Plaintext
{{ $a := . }}
|
||
{{ if and $a (ne (len $a.Names) 0) }}
|
||
{{ $gnd := GetGND $a.GND }}
|
||
{{ $works := LookupWorks $a }}
|
||
{{ $pieces := LookupPieces $a }}
|
||
<div>
|
||
|
||
<!-- Dictionary-style entry with hanging indent -->
|
||
<div class="pl-4" style="text-indent: -1rem;">
|
||
<!-- Name (bold), dates, links -->
|
||
<strong>
|
||
<a href="/akteure/{{ $a.ID }}" class="hover:text-blue-600 transition-colors">
|
||
{{ index $a.Names 0 }}
|
||
</a>
|
||
</strong>
|
||
{{ if ne $gnd nil }}
|
||
{{- if ne (len $gnd.DateOfBirth) 0 -}}
|
||
, {{ HRDateShort (index $gnd.DateOfBirth 0) }}
|
||
{{- end -}}
|
||
{{- if ne (len $gnd.DateOfDeath) 0 -}}
|
||
–{{ HRDateShort (index $gnd.DateOfDeath 0) }}
|
||
{{- end -}}
|
||
{{ end }}
|
||
{{- if ne $gnd nil -}}
|
||
, <a href="{{ $a.GND }}" target="_blank" class="text-blue-600 hover:text-blue-800" title="Gemeinsame Normdatei">GND <i class="ri-external-link-line text-xs"></i></a>
|
||
{{- end -}}
|
||
</div>
|
||
<!-- Professions on second line -->
|
||
{{ if ne $gnd nil }}
|
||
{{- if ne (len $gnd.ProfessionOrOccupation) 0 -}}
|
||
<div class="text-gray-600">
|
||
{{ range $i, $prof := $gnd.ProfessionOrOccupation }}
|
||
{{ if lt $i 3 }}
|
||
{{ if gt $i 0 }}, {{ end }}{{ $prof.Label }}
|
||
{{ end }}
|
||
{{ end }}
|
||
</div>
|
||
{{- end -}}
|
||
{{ end }}
|
||
|
||
{{- if ne (len $works) 0 -}}
|
||
<div class="mt-2">
|
||
<div>
|
||
<strong><i class="ri-book-line mr-1"></i>Werke</strong>
|
||
</div>
|
||
{{ range $_, $w := $works }}
|
||
<div>
|
||
{{- if ne (len $w.Item.Citation.InnerXML ) 0 -}}
|
||
<div class="italic">
|
||
<script type="application/xml" xslt-template="transform-citation" xslt-onload>
|
||
<xml>
|
||
{{- Safe $w.Item.Citation.InnerXML -}}
|
||
</xml>
|
||
</script>
|
||
</div>
|
||
{{- end -}}
|
||
{{ range $_, $url := $w.Item.URLs }}
|
||
<div>
|
||
<a href="{{ $url.Address }}" target="_blank" class="text-blue-600 hover:text-blue-800">
|
||
{{ $url.Chardata }} <i class="ri-external-link-line text-xs"></i>
|
||
</a>
|
||
</div>
|
||
{{ end }}
|
||
</div>
|
||
{{ $workPieces := LookupPieces $w.Item }}
|
||
{{ if len $workPieces }}
|
||
<div class="flex flex-wrap gap-1 mt-1">
|
||
{{ range $_, $p := $workPieces }}
|
||
{{ range $_, $issue := $p.Item.IssueRefs }}
|
||
<a href="/{{ $issue.When }}/{{ $issue.Nr }}{{ if $issue.Von }}{{ if $issue.Beilage }}#beilage-{{ $issue.Beilage }}-page-{{ $issue.Von }}{{ else }}#page-{{ $issue.Von }}{{ end }}{{ end }}" class="inline-block bg-green-50 hover:bg-green-100 text-green-700 hover:text-green-800 px-2 py-1 rounded text-sm transition-colors">
|
||
{{ $issue.Nr }}/{{ $issue.When }}{{ if $issue.Von }} [S. {{ $issue.Von }}{{ if $issue.Bis }}-{{ $issue.Bis }}{{ end }}]{{ end }}
|
||
</a>
|
||
{{ end }}
|
||
{{ end }}
|
||
</div>
|
||
{{ end }}
|
||
{{ end }}
|
||
</div>
|
||
{{ end }}
|
||
|
||
{{ $pieces := LookupPieces $a }}
|
||
{{ if ne (len $pieces) 0 }}
|
||
<div class="mt-2">
|
||
<div>
|
||
<strong><i class="ri-newspaper-line mr-1"></i>Beiträge</strong>
|
||
</div>
|
||
<div class="flex flex-wrap gap-1 mt-1">
|
||
{{ range $_, $p := $pieces }}
|
||
{{ range $_, $issue := $p.Item.IssueRefs }}
|
||
<a href="/{{ $issue.When }}/{{ $issue.Nr }}{{ if $issue.Von }}{{ if $issue.Beilage }}#beilage-{{ $issue.Beilage }}-page-{{ $issue.Von }}{{ else }}#page-{{ $issue.Von }}{{ end }}{{ end }}" class="inline-block bg-green-50 hover:bg-green-100 text-green-700 hover:text-green-800 px-2 py-1 rounded text-sm transition-colors">
|
||
{{ $issue.Nr }}/{{ $issue.When }}{{ if $issue.Von }} [S. {{ $issue.Von }}{{ if $issue.Bis }}-{{ $issue.Bis }}{{ end }}]{{ end }}
|
||
</a>
|
||
{{ end }}
|
||
{{ end }}
|
||
</div>
|
||
</div>
|
||
{{ end }}
|
||
</div>
|
||
{{ end }}
|