dorfylegends/backend/templates/hf.html

142 lines
3.7 KiB
HTML
Raw Normal View History

2022-04-16 21:34:19 +03:00
{{template "layout.html" .}}
{{define "title"}}{{ title .Name }}{{end}}
{{define "content"}}
2022-04-29 15:21:27 +03:00
<h3>{{ title .Name }}</h3>
{{if .Female }}
<i class="fa-solid fa-venus fa-xs"></i>
{{else}}
<i class="fa-solid fa-mars fa-xs"></i>
2022-04-16 21:34:19 +03:00
{{end}}
2022-05-05 17:55:57 +03:00
{{ .Race }}
2022-05-05 23:18:31 +03:00
{{ if .Deity}}deity{{end}}
{{ if .Force}}force{{end}}
2022-05-05 17:55:57 +03:00
{{ if .Vampire}}vampire{{end}}
{{ if .Werebeast}}werebeast{{end}}
{{ if .Necromancer}}necromancer{{end}}
2022-05-05 23:18:31 +03:00
{{ if not (or .Deity .Force)}}
2022-05-05 17:55:57 +03:00
(*{{ .BirthYear }}{{ if ge .DeathYear 0 }} †{{ .DeathYear }}{{ end }})
2022-05-05 23:18:31 +03:00
{{ end }}
2022-04-29 15:21:27 +03:00
<div class="row mt-3">
<div class="col-4">
{{- if ne 0 (len .SiteLink) }}
<h5>Sites</h5>
<ul>
{{- range $i := .SiteLink }}
<li>
{{ site $i.SiteId }} ({{ $i.LinkType }})
</li>
{{- end }}
</ul>
{{- end }}
2022-04-16 21:34:19 +03:00
2022-04-29 15:21:27 +03:00
{{- if or (ne 0 (len .EntityFormerPositionLink)) (ne 0 (len .EntityPositionLink)) }}
<h5>Positions</h5>
<ul>
{{- range $i := .EntityFormerPositionLink }}
<li>
2022-05-04 12:42:02 +03:00
{{ ((getEntity $i.EntityId).Position $i.PositionProfileId).GenderName $ }} of {{ entity $i.EntityId }} ({{
2022-04-29 15:21:27 +03:00
$i.StartYear }} - {{ $i.EndYear }})
</li>
{{- end }}
{{- range $i := .EntityPositionLink }}
<li>
2022-05-04 12:42:02 +03:00
{{ ((getEntity $i.EntityId).Position $i.PositionProfileId).GenderName $ }} of {{ entity $i.EntityId }} (since {{
$i.StartYear }})
2022-04-29 15:21:27 +03:00
</li>
{{- end }}
</ul>
{{- end }}
</div>
{{- if ne 0 (len .HfLink) }}
<div class="col-4">
<h5>Related Figures</h5>
<ul>
{{- range $i := .HfLink }}
<li>
{{ hf $i.Hfid }} ({{ $i.LinkType }})
</li>
{{- end }}
</ul>
</div>
2022-04-16 23:12:23 +03:00
{{- end }}
2022-04-29 15:21:27 +03:00
{{- if ne 0 (len .EntityLink) }}
<div class="col-4">
<h5>Related Entities</h5>
<ul>
{{- range $i := .EntityLink }}
<li>
{{ entity $i.EntityId }} ({{ $i.LinkType }})
</li>
{{- end }}
</ul>
</div>
2022-04-16 23:12:23 +03:00
{{- end }}
2022-04-29 15:21:27 +03:00
</div>
<div class="row">
{{- if ne 0 (len .EntityReputation) }}
<div class="col-4">
<h5>Entity Reputations</h5>
<ul>
{{- range $i := .EntityReputation }}
<li>
{{ entity $i.EntityId }}
<ul>
{{if gt .UnsolvedMurders 0}}<li>Unsolved Murders: {{.UnsolvedMurders}}</li>{{end}}
{{if gt .FirstAgelessYear 0}}<li>First Suspected Ageless Year: {{.FirstAgelessYear}}</li>{{end}}
</ul>
</li>
{{- end }}
</ul>
</div>
2022-04-16 21:34:19 +03:00
{{- end }}
2022-04-29 15:21:27 +03:00
{{- if ne 0 (len .VagueRelationship) }}
<div class="col-4">
<h5>Relationships</h5>
<ul>
{{- range $i := .VagueRelationship }}
<li>
{{ hf $i.Hfid }} (TODO)
</li>
{{- end }}
</ul>
</div>
{{- end }}
{{- if ne 0 (len .IntrigueActor) }}
<div class="col-8">
<h5>Intrigue Actors</h5>
<ul>
{{- range $i := .IntrigueActor }}
<li>
{{if ne .EntityId -1}}{{entity .EntityId}}{{else}}{{ hf .Hfid }}{{end}} - {{.Role}} - {{.Strategy}}
</li>
{{- end }}
</ul>
</div>
2022-04-16 21:34:19 +03:00
{{- end }}
2022-04-16 23:12:23 +03:00
2022-04-29 15:21:27 +03:00
{{- if ne 0 (len .IntriguePlot) }}
<div class="col-4">
<h5>Intrigue Plots</h5>
<ul>
{{- range $i := .IntriguePlot }}
<li>
{{ .Type_ }}{{if .OnHold}} (on hold){{end}}
</li>
{{- end }}
</ul>
</div>
{{- end }}
</div>
2022-04-16 23:12:23 +03:00
2022-04-29 15:21:27 +03:00
<h5>Events</h5>
2022-04-19 18:46:11 +03:00
{{ template "events.html" events . }}
2022-04-16 23:12:23 +03:00
2022-04-29 15:21:27 +03:00
{{ json . }}
{{end}}