dorfylegends/backend/templates/hf.html

53 lines
1.1 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>
2022-04-22 18:45:10 +03:00
{{ ((getEntity $i.EntityId).Position $i.PositionProfileId).Name }} of {{ entity $i.EntityId }} ({{
2022-04-16 23:12:23 +03:00
$i.StartYear }} - {{ $i.EndYear }})
</li>
{{- end }}
{{- range $i := .EntityPositionLink }}
<li>
2022-04-22 18:45:10 +03:00
of {{ entity $i.EntityId }}
2022-04-16 23:12:23 +03:00
</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>
2022-04-22 18:45:10 +03:00
{{ hf $i.Hfid }} ({{ $i.LinkType }})
2022-04-16 21:34:19 +03:00
</li>
{{- end }}
</ul>
{{- end }}
{{- if ne 0 (len .EntityLink) }}
<h3>Related Entities</h3>
<ul>
{{- range $i := .EntityLink }}
<li>
2022-04-22 18:45:10 +03:00
{{ entity $i.EntityId }} ({{ $i.LinkType }})
2022-04-16 21:34:19 +03:00
</li>
{{- end }}
</ul>
2022-04-16 23:12:23 +03:00
{{- end }}
<h3>Events</h3>
2022-04-19 18:46:11 +03:00
{{ template "events.html" events . }}
2022-04-16 23:12:23 +03:00
{{ json . }}