dorfylegends/backend/templates/geography.html

97 lines
3.5 KiB
HTML
Raw Permalink Normal View History

2022-05-04 12:42:02 +03:00
{{template "layout.html" .}}
{{define "title"}}Geography{{end}}
{{define "content"}}
<h3>Geography</h3>
<nav>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
2022-05-06 16:16:16 +03:00
{{ $active := " active"}}
2022-05-04 12:42:02 +03:00
{{- range $t, $v := .Regions }}
2022-05-11 10:45:17 +03:00
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{
len $v }})</a>
2022-05-06 16:16:16 +03:00
{{ $active = ""}}{{- end}}
2022-05-04 12:42:02 +03:00
{{- range $t, $v := .Landmasses }}
2022-05-11 10:45:17 +03:00
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
$v }})</a>
2022-05-06 16:16:16 +03:00
{{ $active = ""}}{{- end}}
2022-05-04 12:42:02 +03:00
{{- range $t, $v := .MountainPeaks }}
2022-05-11 10:45:17 +03:00
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
$v }})</a>
2022-05-06 16:16:16 +03:00
{{ $active = ""}}{{- end}}
2022-05-04 12:42:02 +03:00
{{- range $t, $v := .Rivers }}
2022-05-11 10:45:17 +03:00
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
$v }})</a>
2022-05-06 16:16:16 +03:00
{{ $active = ""}}{{- end}}
2022-05-04 12:42:02 +03:00
</div>
</nav>
<div class="tab-content" id="nav-tabContent">
2022-05-06 16:16:16 +03:00
{{ $active := " active"}}
2022-05-04 12:42:02 +03:00
{{- range $t, $v := .Regions }}
2022-05-06 16:16:16 +03:00
<div class="tab-pane{{$active}}" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
2022-05-04 12:42:02 +03:00
<table class="table table-hover table-sm table-borderless">
<tr>
<th width="100%">Name</th>
<th>Type</th>
</tr>
{{- range $v }}{{- if not (eq .Name "") }}
<tr>
<td>{{ region .Id }}</td>
<td>{{ .Type }}</td>
</tr>
{{- end}}{{- end}}
</table>
</div>
2022-05-06 16:16:16 +03:00
{{ $active = ""}}{{- end}}
2022-05-04 12:42:02 +03:00
{{- range $t, $v := .Landmasses }}
2022-05-06 16:16:16 +03:00
<div class="tab-pane{{$active}}" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
2022-05-04 12:42:02 +03:00
<table class="table table-hover table-sm table-borderless">
<tr>
<th width="100%">Name</th>
<th>Size</th>
</tr>
{{- range $v }}{{- if not (eq .Name "") }}
<tr>
<td>{{ landmass .Id }}</td>
<td></td>
</tr>
{{- end}}{{- end}}
</table>
</div>
2022-05-06 16:16:16 +03:00
{{ $active = ""}}{{- end}}
2022-05-04 12:42:02 +03:00
{{- range $t, $v := .MountainPeaks }}
2022-05-06 16:16:16 +03:00
<div class="tab-pane{{$active}}" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
2022-05-04 12:42:02 +03:00
<table class="table table-hover table-sm table-borderless object-table">
<tr>
<th width="100%">Name</th>
<th>Type</th>
</tr>
{{- range $v }}{{- if not (eq .Name "") }}
<tr>
<td>{{ mountain .Id }}</td>
<td>{{ if .IsVolcano }}volcano{{else}}mountain{{end}}</td>
</tr>
{{- end}}{{- end}}
</table>
</div>
2022-05-06 16:16:16 +03:00
{{ $active = ""}}{{- end}}
2022-05-04 12:42:02 +03:00
{{- range $t, $v := .Rivers }}
2022-05-06 16:16:16 +03:00
<div class="tab-pane{{$active}}" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
2022-05-04 12:42:02 +03:00
<table class="table table-hover table-sm table-borderless object-table">
<tr>
<th width="100%">Name</th>
<th>Size</th>
</tr>
{{- range $i, $r := $v }}{{- if not (eq .Name "") }}
<tr>
<td>{{ river $i }}</td>
<td></td>
</tr>
{{- end}}{{- end}}
</table>
</div>
2022-05-06 16:16:16 +03:00
{{ $active = ""}}{{- end}}
2022-05-04 12:42:02 +03:00
</div>
{{- end }}