diff --git a/backend/model/extensions.go b/backend/model/extensions.go index 5c4f812..50bb8fb 100644 --- a/backend/model/extensions.go +++ b/backend/model/extensions.go @@ -149,6 +149,14 @@ func (hf *HistoricalFigure) FirstName() string { return strings.Split(hf.Name_, " ")[0] } +func (hf *HistoricalFigure) Goals() string { + return andList(util.Map(hf.Goal, func(g HistoricalFigureGoal) string { return g.String() })) +} + +func (hf *HistoricalFigure) Pets() string { + return andList(util.Map(hf.JourneyPet, func(g string) string { return articled(strings.ToLower(g)) })) +} + func (x *Honor) Requirement() string { var list []string if x.RequiresAnyMeleeOrRangedSkill { diff --git a/backend/templates/hf.html b/backend/templates/hf.html index 753e8c0..06f95b0 100644 --- a/backend/templates/hf.html +++ b/backend/templates/hf.html @@ -4,20 +4,37 @@ {{define "content"}}
+ {{if .Female }} + + {{else}} + + {{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 }} +
+ +{{ if .IsVolcano }}volcano{{else}}mountain{{end}}
+{{ json . }}
-{{ template "events.html" events . }} - -{{ json . }}
{{- end }} \ No newline at end of file diff --git a/backend/templates/region.html b/backend/templates/region.html index df2a541..8a21970 100644 --- a/backend/templates/region.html +++ b/backend/templates/region.html @@ -6,8 +6,14 @@{{ .Type }}
-{{ json . }}