mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-12-16 20:15:29 +00:00
Some Styling
This commit is contained in:
@@ -1,73 +1,76 @@
|
||||
{{ $a := . }}
|
||||
{{ if and $a (ne (len $a.Names) 0) }}
|
||||
<div class="pb-4">
|
||||
{{ index $a.Names 0 }}
|
||||
<div>
|
||||
{{ $gnd := GetGND $a.GND }}
|
||||
{{ if (ne $gnd nil) }}
|
||||
{{- if ne (len $gnd.DateOfBirth) 0 -}}
|
||||
<i class="ri-asterisk text-xs relative bottom-0.5"></i>
|
||||
{{- HRDateShort (index $gnd.DateOfBirth 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 -}}
|
||||
{{- if ne (len $gnd.DateOfDeath) 0 }}
|
||||
 <i class="ri-cross-fill text-xs relative bottom-0.5"></i
|
||||
> {{ HRDateShort (index $gnd.DateOfDeath 0) }}
|
||||
{{ end }}
|
||||
{{- if ne (len $gnd.ProfessionOrOccupation) 0 -}}
|
||||
<div>
|
||||
{{- (index $gnd.ProfessionOrOccupation 0).Label -}}
|
||||
{{- if gt (len $gnd.ProfessionOrOccupation) 1 -}}
|
||||
,
|
||||
{{ (index $gnd.ProfessionOrOccupation 1).Label -}}
|
||||
{{ end -}}
|
||||
{{- if gt (len $gnd.ProfessionOrOccupation) 2 -}}
|
||||
,
|
||||
{{ (index $gnd.ProfessionOrOccupation 2).Label -}}
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex gap-x-2 flex-row">
|
||||
<a href="/akteure/{{ $a.ID }}" class="no-underline!"><i class="ri-links-line"></i></a>
|
||||
|
||||
{{- if ne $gnd nil -}}
|
||||
<a href="{{ $a.GND }}" target="_blank">GND →</a>
|
||||
{{- if ne (len $gnd.Wikipedia) 0 -}}
|
||||
<a href="{{ (index $gnd.Wikipedia 0).Label }}" target="_blank">WIKI →</a>
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
{{- 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 }}
|
||||
|
||||
{{ $works := LookupWorks $a }}
|
||||
{{- if ne (len $works) 0 -}}
|
||||
<div>
|
||||
<div class="mt-2">
|
||||
<div>
|
||||
<strong><i class="ri-book-line mr-1"></i>Werke</strong>
|
||||
</div>
|
||||
{{ range $_, $w := $works }}
|
||||
{{- if ne (len $w.Item.Citation.InnerXML ) 0 -}}
|
||||
<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>
|
||||
{{- end -}}
|
||||
{{ range $_, $url := $w.Item.URLs }}
|
||||
<div>
|
||||
<a href="{{ $url.Address }}" target="_blank">{{ $url.Chardata }}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ $pieces := LookupPieces $w.Item }}
|
||||
{{ if len $pieces }}
|
||||
<div>
|
||||
{{ range $_, $p := $pieces }}
|
||||
{{- range $_, $i := $p.Item.IssueRefs -}}
|
||||
<div>
|
||||
<a href="/{{ $i.When }}/{{ $i.Nr }}">{{ $i.Nr }}/{{ $i.When }}</a>
|
||||
</div>
|
||||
{{- end -}}
|
||||
</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 }}" 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 }}
|
||||
@@ -76,17 +79,21 @@
|
||||
{{ end }}
|
||||
|
||||
{{ $pieces := LookupPieces $a }}
|
||||
{{- if ne (len $pieces) 0 -}}
|
||||
<div>
|
||||
{{ range $_, $p := $pieces }}
|
||||
{{- range $_, $i := $p.Item.IssueRefs -}}
|
||||
<div>
|
||||
<a href="/{{ $i.When }}/{{ $i.Nr }}">{{ $i.Nr }}/{{ $i.When }}</a>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
{{ 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 }}" 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 }}
|
||||
|
||||
Reference in New Issue
Block a user