dorfylegends/backend/templates/hf.html

53 lines
1.2 KiB
HTML
Raw Normal View History

2022-04-16 21:34:19 +03:00
{{template "layout.html" .}}
{{define "title"}}{{ title .Name }}{{end}}
{{define "content"}}
<h1>{{ title .Name }}</h1>
{{ .Race }} (*{{ .BirthYear }}{{ if ge .DeathYear 0 }} †{{ .DeathYear }}{{ end }})
{{end}}
2022-04-16 23:12:23 +03:00
{{- 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 }}
2022-04-16 21:34:19 +03:00
{{- 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>
2022-04-16 23:12:23 +03:00
{{- end }}
<h3>Events</h3>
{{ template "events.html" . }}
{{ json . }}