2022-05-05 23:18:31 +03:00
|
|
|
{{template "layout.html" .}}
|
|
|
|
|
|
|
|
{{define "title"}}Historical Figures{{end}}
|
|
|
|
|
|
|
|
{{define "content"}}
|
|
|
|
<h3>Historical Figures</h3>
|
|
|
|
|
|
|
|
{{ json .Params }}
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-10">
|
|
|
|
<table class="table table-hover table-sm table-borderless object-table">
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Race</th>
|
|
|
|
<th>Lived</th>
|
2022-05-07 23:19:30 +03:00
|
|
|
<th>Kills</th>
|
2022-05-05 23:18:31 +03:00
|
|
|
</tr>
|
|
|
|
{{- range .Hfs }}{{- if not (eq .Name "") }}
|
|
|
|
<tr>
|
2022-05-09 18:20:31 +03:00
|
|
|
<td><a class="hf" href="./hf/{{.Id}}">{{ title .Name }}</a></td>
|
2022-05-05 23:18:31 +03:00
|
|
|
<td>{{ .Race }}</td>
|
|
|
|
<td>
|
|
|
|
{{- if eq .DeathYear -1 }}
|
|
|
|
from {{ .BirthYear }} till now
|
|
|
|
{{- else }}
|
|
|
|
from {{ .BirthYear }} till {{ .DeathYear }}
|
|
|
|
{{- end }}
|
|
|
|
</td>
|
2022-05-07 23:19:30 +03:00
|
|
|
<td>{{ len .Kills }}</td>
|
2022-05-05 23:18:31 +03:00
|
|
|
</tr>
|
|
|
|
{{- end}}{{- end}}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-2">
|
|
|
|
<h5>Filter</h5>
|
2022-05-09 18:20:31 +03:00
|
|
|
<form action="./hfs" method="GET">
|
2022-05-05 23:18:31 +03:00
|
|
|
<div class="checkbox"><label><input class="filter" type="checkbox" name="leader" value="1" {{if eq .Params.leader "1"
|
|
|
|
}}checked{{end}}> Leader</label></div>
|
|
|
|
<div class="checkbox"><label><input class="filter" type="checkbox" name="deity" value="1" {{if eq .Params.deity "1"
|
|
|
|
}}checked{{end}}> Deity</label></div>
|
|
|
|
<div class="checkbox"><label><input class="filter" type="checkbox" name="force" value="1" {{if eq .Params.force "1"
|
|
|
|
}}checked{{end}}> Force</label></div>
|
|
|
|
<div class="checkbox"><label><input class="filter" type="checkbox" name="vampire" value="1" {{if eq .Params.vampire "1"
|
|
|
|
}}checked{{end}}> Vampire</label></div>
|
|
|
|
<div class="checkbox"><label><input class="filter" type="checkbox" name="werebeast" value="1" {{if eq .Params.werebeast "1"
|
|
|
|
}}checked{{end}}> Werebeast</label></div>
|
|
|
|
<div class="checkbox"><label><input class="filter" type="checkbox" name="necromancer" value="1" {{if eq .Params.necromancer "1"
|
|
|
|
}}checked{{end}}> Necromancer</label></div>
|
|
|
|
<div class="checkbox"><label><input class="filter" type="checkbox" name="alive" value="1" {{if eq .Params.alive "1"
|
|
|
|
}}checked{{end}}> Alive</label></div>
|
|
|
|
<div class="checkbox"><label><input class="filter" type="checkbox" name="ghost" value="1" {{if eq .Params.ghost "1"
|
|
|
|
}}checked{{end}}> Ghost</label></div>
|
|
|
|
<div class="checkbox"><label><input class="filter" type="checkbox" name="adventurer" value="1" {{if eq .Params.adventurer "1"
|
|
|
|
}}checked{{end}}> Adventurer</label></div>
|
2022-05-07 23:19:30 +03:00
|
|
|
<div class="select form-group mt-1 mb-3">
|
2022-05-05 23:18:31 +03:00
|
|
|
<select class="form-control" name="race">
|
|
|
|
<option class="text-muted" value="">Race</option>
|
2022-05-07 23:19:30 +03:00
|
|
|
{{- range world.Races -}}
|
|
|
|
<option value="{{ . }}" {{if eq $.Params.race . }}selected{{end}}>{{ . }}</option>
|
|
|
|
{{- end -}}
|
2022-05-05 23:18:31 +03:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<h4>Sorting</h4>
|
|
|
|
<div class="select form-group">
|
|
|
|
<select class="form-control" name="sort">
|
|
|
|
<option value="">Default</option>
|
2022-05-07 23:19:30 +03:00
|
|
|
<option value="name" {{if eq .Params.sort "name" }}selected{{end}}>Name</option>
|
|
|
|
<option value="race" {{if eq .Params.sort "race" }}selected{{end}}>Race</option>
|
|
|
|
<option value="birth" {{if eq .Params.sort "birth" }}selected{{end}}>Birth</option>
|
|
|
|
<option value="death" {{if eq .Params.sort "death" }}selected{{end}}>Death</option>
|
|
|
|
<option value="kills" {{if eq .Params.sort "kills" }}selected{{end}}>Kills</option>
|
2022-05-05 23:18:31 +03:00
|
|
|
</select>
|
|
|
|
</div>
|
2022-05-07 23:19:30 +03:00
|
|
|
<button type="submit" class="btn btn-primary mt-4">Refresh</button>
|
2022-05-05 23:18:31 +03:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{- end }}
|