dorfylegends/backend/templates/hf.html
Robert Janetzko d29ab0dce1 events
2022-04-19 15:46:11 +00:00

53 lines
No EOL
1.2 KiB
HTML

{{template "layout.html" .}}
{{define "title"}}{{ title .Name }}{{end}}
{{define "content"}}
<h1>{{ title .Name }}</h1>
{{ .Race }} (*{{ .BirthYear }}{{ if ge .DeathYear 0 }} †{{ .DeathYear }}{{ end }})
{{end}}
{{- if or (ne 0 (len .EntityFormerPositionLink)) (ne 0 (len .EntityPositionLink)) }}
<h3>Positions</h3>
<ul>
{{- range $i := .EntityFormerPositionLink }}
<li>
{{ ((getEntity $i.EntityId).Position $i.PositionProfileId).Name }} of {{ template "entityLink.html" (getEntity $i.EntityId) }} ({{
$i.StartYear }} - {{ $i.EndYear }})
</li>
{{- end }}
{{- range $i := .EntityPositionLink }}
<li>
of {{ template "entityLink.html" (getEntity $i.EntityId) }}
</li>
{{- end }}
</ul>
{{- end }}
{{- if ne 0 (len .HfLink) }}
<h3>Related Figures</h3>
<ul>
{{- range $i := .HfLink }}
<li>
{{ template "hfLink.html" (getHf $i.Hfid) }} ({{ $i.LinkType }})
</li>
{{- end }}
</ul>
{{- end }}
{{- if ne 0 (len .EntityLink) }}
<h3>Related Entities</h3>
<ul>
{{- range $i := .EntityLink }}
<li>
{{ template "entityLink.html" (getEntity $i.EntityId) }} ({{ $i.LinkType }})
</li>
{{- end }}
</ul>
{{- end }}
<h3>Events</h3>
{{ template "events.html" events . }}
{{ json . }}