dorfylegends/backend/templates/hf.html

162 lines
4.5 KiB
HTML
Raw Permalink 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>
2022-05-06 17:17:50 +03:00
<p>
{{if .Female }}
<i class="fa-solid fa-venus fa-xs"></i>
{{else}}
<i class="fa-solid fa-mars fa-xs"></i>
{{end}}
{{ .Race }}
{{ if .Deity}}deity{{end}}
{{ if .Force}}force{{end}}
{{ if .Vampire}}vampire{{end}}
{{ if .Werebeast}}werebeast{{end}}
{{ if .Necromancer}}necromancer{{end}}
{{ if not (or .Deity .Force)}}
(*{{ .BirthYear }}{{ if ge .DeathYear 0 }} †{{ .DeathYear }}{{ end }})
{{ end }}
</p>
<dl class="row">
{{- if gt (len .Sphere) 0 -}}
<dt class="col-2 col-lg-1">Spheres</dt>
<dd class="col-10 col-lg-11">{{ andList .Sphere }}</dd>
{{- end -}}
{{- if gt (len .Goal) 0 -}}
<dt class="col-2 col-lg-1">Goals</dt>
<dd class="col-10 col-lg-11">{{ .Goals }}</dd>
{{- end -}}
{{- if gt (len .JourneyPet) 0 -}}
<dt class="col-2 col-lg-1">Pets</dt>
<dd class="col-10 col-lg-11">{{ .Pets }}</dd>
{{- end -}}
</dl>
2022-04-29 15:21:27 +03:00
<div class="row mt-3">
2022-05-06 17:25:54 +03:00
{{- if or (ne 0 (len .SiteLink)) (ne 0 (len .EntityFormerPositionLink)) (ne 0 (len .EntityPositionLink)) }}
2022-04-29 15:21:27 +03:00
<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>
2022-05-06 17:25:54 +03:00
{{- end }}
2022-04-29 15:21:27 +03:00
{{- 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>
2022-05-06 14:11:12 +03:00
{{ .Type_ }} {{ if ne .ArtifactId -1 }}{{ artifact .ArtifactId}}{{end}}
{{if .OnHold}} (on hold){{end}}
2022-04-29 15:21:27 +03:00
</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}}