collection maps
This commit is contained in:
parent
f13fa945e6
commit
efd75d9102
|
@ -127,6 +127,45 @@ var AddMapRiver = func(w *DfWorld, id int) template.HTML {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func AddMapCollection(w *DfWorld, id int) template.HTML {
|
||||||
|
if x, ok := w.HistoricalEventCollections[id]; ok {
|
||||||
|
r := ""
|
||||||
|
switch d := x.Details.(type) {
|
||||||
|
case *HistoricalEventCollectionBeastAttack:
|
||||||
|
r += string(AddMapSite(w, d.SiteId, false))
|
||||||
|
case *HistoricalEventCollectionDuel:
|
||||||
|
c1 := strings.Split(d.Coords, ",")
|
||||||
|
x, _ := strconv.Atoi(c1[0])
|
||||||
|
y, _ := strconv.Atoi(c1[1])
|
||||||
|
r += fmt.Sprintf(`<script>addBattle(%d, %d, %d)</script>`, id, x, y)
|
||||||
|
case *HistoricalEventCollectionSiteConquered:
|
||||||
|
r += string(AddMapSite(w, d.SiteId, false))
|
||||||
|
case *HistoricalEventCollectionBattle:
|
||||||
|
if d.SiteId != -1 {
|
||||||
|
r += string(AddMapSite(w, d.SiteId, false))
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, s := range d.AttackingSquadSite {
|
||||||
|
r += string(AddMapSite(w, s, true))
|
||||||
|
}
|
||||||
|
for _, s := range d.DefendingSquadSite {
|
||||||
|
r += string(AddMapSite(w, s, true))
|
||||||
|
}
|
||||||
|
|
||||||
|
c1 := strings.Split(d.Coords, ",")
|
||||||
|
x, _ := strconv.Atoi(c1[0])
|
||||||
|
y, _ := strconv.Atoi(c1[1])
|
||||||
|
r += fmt.Sprintf(`<script>addBattle(%d, %d, %d)</script>`, id, x, y)
|
||||||
|
case *HistoricalEventCollectionWar:
|
||||||
|
for _, y := range x.Eventcol {
|
||||||
|
r += string(AddMapCollection(w, y))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return template.HTML(r)
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
var AndList = func(s []string) template.HTML { return template.HTML(andList(s)) }
|
var AndList = func(s []string) template.HTML { return template.HTML(andList(s)) }
|
||||||
|
|
||||||
func andList(list []string) string {
|
func andList(list []string) string {
|
||||||
|
|
|
@ -69,6 +69,7 @@ func (srv *DfServer) LoadTemplates() {
|
||||||
"addMountain": func(id int, color bool) template.HTML { return model.AddMapMountain(srv.context.world, id, color) },
|
"addMountain": func(id int, color bool) template.HTML { return model.AddMapMountain(srv.context.world, id, color) },
|
||||||
"addWorldConstruction": func(id int) template.HTML { return model.AddMapWorldConstruction(srv.context.world, id) },
|
"addWorldConstruction": func(id int) template.HTML { return model.AddMapWorldConstruction(srv.context.world, id) },
|
||||||
"addRiver": func(id int) template.HTML { return model.AddMapRiver(srv.context.world, id) },
|
"addRiver": func(id int) template.HTML { return model.AddMapRiver(srv.context.world, id) },
|
||||||
|
"addCollection": func(id int) template.HTML { return model.AddMapCollection(srv.context.world, id) },
|
||||||
|
|
||||||
"events": func(obj any) *model.EventList {
|
"events": func(obj any) *model.EventList {
|
||||||
return model.NewEventList(srv.context.world, obj)
|
return model.NewEventList(srv.context.world, obj)
|
||||||
|
|
|
@ -28,6 +28,12 @@ a {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-tabs .tab-content {
|
||||||
|
overflow-y: auto;
|
||||||
|
max-height: 300px;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.popover {
|
.popover {
|
||||||
max-width: fit-content;
|
max-width: fit-content;
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,7 +189,7 @@ function coord(y, x) {
|
||||||
return [x, y];
|
return [x, y];
|
||||||
}
|
}
|
||||||
|
|
||||||
function addBattle(name, y, x) {
|
function addBattle(id, y, x) {
|
||||||
x = worldWidth - x - 1;
|
x = worldWidth - x - 1;
|
||||||
var polygon = L.polygon(
|
var polygon = L.polygon(
|
||||||
[[x + 0.5, y + battleOffset],
|
[[x + 0.5, y + battleOffset],
|
||||||
|
@ -201,7 +201,7 @@ function addBattle(name, y, x) {
|
||||||
weight: 3
|
weight: 3
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
attachTooltip(polygon, name);
|
attachTooltip(polygon, urlToolTip("collection", id));
|
||||||
|
|
||||||
minx = Math.min(x, minx);
|
minx = Math.min(x, minx);
|
||||||
miny = Math.min(y, miny);
|
miny = Math.min(y, miny);
|
||||||
|
|
|
@ -9,16 +9,16 @@
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
{{ $active := " active"}}
|
{{ $active := " active"}}
|
||||||
{{- range $t, $v := .DanceForms }}
|
{{- range $t, $v := .DanceForms }}
|
||||||
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{
|
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{
|
||||||
len $v }})</button>
|
len $v }})</a>
|
||||||
{{ $active = ""}}{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- range $t, $v := .MusicalForms }}
|
{{- range $t, $v := .MusicalForms }}
|
||||||
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
|
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
|
||||||
$v }})</button>
|
$v }})</a>
|
||||||
{{ $active = ""}}{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- range $t, $v := .PoeticForms }}
|
{{- range $t, $v := .PoeticForms }}
|
||||||
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
|
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
|
||||||
$v }})</button>
|
$v }})</a>
|
||||||
{{ $active = ""}}{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<nav>
|
<nav>
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
{{- range $t, $v := .}}
|
{{- range $t, $v := .}}
|
||||||
<button class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
<a class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
||||||
role="tab">{{$t}} ({{ len $v }})</button>
|
role="tab">{{$t}} ({{ len $v }})</a>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -4,6 +4,14 @@
|
||||||
|
|
||||||
{{define "content"}}
|
{{define "content"}}
|
||||||
|
|
||||||
|
{{ if world.MapReady }}
|
||||||
|
<div class="object-map">
|
||||||
|
<div id="map" style="width: 300px; height: 300px"></div>
|
||||||
|
</div>
|
||||||
|
{{initMap}}
|
||||||
|
{{ addCollection .Id }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
<h3>{{ html (capitalize (string (collection .Id))) }}</h3>
|
<h3>{{ html (capitalize (string (collection .Id))) }}</h3>
|
||||||
|
|
||||||
{{- if eq .Type "occasion" }}{{- with getOccasion .Details.CivId .Details.OccasionId }}{{- if ne .Event -1 }}
|
{{- if eq .Type "occasion" }}{{- with getOccasion .Details.CivId .Details.OccasionId }}{{- if ne .Event -1 }}
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<nav>
|
<nav>
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
{{- range $t, $v := .}}
|
{{- range $t, $v := .}}
|
||||||
<button class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
<a class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
||||||
role="tab">{{$t}} ({{ len $v }})</button>
|
role="tab">{{$t}} ({{ len $v }})</a>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<nav>
|
<nav>
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
{{- range $t, $v := .}}
|
{{- range $t, $v := .}}
|
||||||
<button class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
<a class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
||||||
role="tab">{{$t}} ({{ len $v }})</button>
|
role="tab">{{$t}} ({{ len $v }})</a>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -32,22 +32,19 @@
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
{{ $active := " active"}}
|
{{ $active := " active"}}
|
||||||
{{- if gt (len .Leaders) 0 }}
|
{{- if gt (len .Leaders) 0 }}
|
||||||
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-leaders" type="button"
|
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-leaders" type="button" role="tab">Leaders</a>
|
||||||
role="tab">Leaders</button>
|
|
||||||
{{ $active = ""}}{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- if gt (len .Sites) 0 }}
|
{{- if gt (len .Sites) 0 }}
|
||||||
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-sites" type="button" role="tab">Sites</button>
|
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-sites" type="button" role="tab">Sites</a>
|
||||||
{{ $active = ""}}{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- if gt (len .HistfigId) 0 }}
|
{{- if gt (len .HistfigId) 0 }}
|
||||||
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-members" type="button"
|
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-members" type="button" role="tab">Members</a>
|
||||||
role="tab">Members</button>
|
|
||||||
{{ $active = ""}}{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- if gt (len .Child) 0 }}
|
{{- if gt (len .Child) 0 }}
|
||||||
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-children" type="button"
|
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-children" type="button" role="tab">Groups</a>
|
||||||
role="tab">Groups</button>
|
|
||||||
{{ $active = ""}}{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- if gt (len .Wars) 0 }}
|
{{- if gt (len .Wars) 0 }}
|
||||||
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-wars" type="button" role="tab">Wars</button>
|
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-wars" type="button" role="tab">Wars</a>
|
||||||
{{ $active = ""}}{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -9,20 +9,20 @@
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
{{ $active := " active"}}
|
{{ $active := " active"}}
|
||||||
{{- range $t, $v := .Regions }}
|
{{- range $t, $v := .Regions }}
|
||||||
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{
|
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{
|
||||||
len $v }})</button>
|
len $v }})</a>
|
||||||
{{ $active = ""}}{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- range $t, $v := .Landmasses }}
|
{{- range $t, $v := .Landmasses }}
|
||||||
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
|
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
|
||||||
$v }})</button>
|
$v }})</a>
|
||||||
{{ $active = ""}}{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- range $t, $v := .MountainPeaks }}
|
{{- range $t, $v := .MountainPeaks }}
|
||||||
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
|
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
|
||||||
$v }})</button>
|
$v }})</a>
|
||||||
{{ $active = ""}}{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- range $t, $v := .Rivers }}
|
{{- range $t, $v := .Rivers }}
|
||||||
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
|
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
|
||||||
$v }})</button>
|
$v }})</a>
|
||||||
{{ $active = ""}}{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -89,12 +89,13 @@
|
||||||
var hash = document.location.hash;
|
var hash = document.location.hash;
|
||||||
if (hash && hash.startsWith("#nav-")) {
|
if (hash && hash.startsWith("#nav-")) {
|
||||||
var hashPieces = hash.split('?');
|
var hashPieces = hash.split('?');
|
||||||
activeTab = $('.nav-link[data-bs-target="' + hashPieces[0] + '"]');
|
|
||||||
console.log(hashPieces[0], activeTab);
|
var someTabTriggerEl = document.querySelector('.nav-link[data-bs-target="' + hashPieces[0] + '"]')
|
||||||
activeTab && activeTab.click()
|
var tab = new bootstrap.Tab(someTabTriggerEl)
|
||||||
|
tab.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.nav-tabs button').on('click', function (e) {
|
$('.nav-tabs button,.nav-tabs a').on('click', function (e) {
|
||||||
window.location.hash = $(this).data("bs-target")
|
window.location.hash = $(this).data("bs-target")
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<nav>
|
<nav>
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
{{- range $t, $v := .}}
|
{{- range $t, $v := .}}
|
||||||
<button class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
<a class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
||||||
role="tab">{{$t}} ({{ len $v }})</button>
|
role="tab">{{$t}} ({{ len $v }})</a>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -8,19 +8,21 @@
|
||||||
<h3>{{ title .Name }}</h3>
|
<h3>{{ title .Name }}</h3>
|
||||||
<p>{{ .Type_ }}</p>
|
<p>{{ .Type_ }}</p>
|
||||||
|
|
||||||
|
{{ $history := history .Id }}
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
{{ $active := " active"}}
|
{{ $active := " active"}}
|
||||||
{{- if gt (len .Structures) 0 }}
|
{{- if gt (len .Structures) 0 }}
|
||||||
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-structures" type="button"
|
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-structures" type="button" role="tab">Structures</a>
|
||||||
role="tab">Structures</button>
|
|
||||||
{{ $active = ""}}{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- if gt (len .SiteProperties) 0 }}
|
{{- if gt (len .SiteProperties) 0 }}
|
||||||
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-site-properties" type="button"
|
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-site-properties" type="button"
|
||||||
role="tab">Properties</button>
|
role="tab">Properties</a>
|
||||||
|
{{ $active = ""}}{{- end}}
|
||||||
|
{{- if gt (len $history) 0 }}
|
||||||
|
<a class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-history" type="button" role="tab">History</a>
|
||||||
{{ $active = ""}}{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-history" type="button"
|
|
||||||
role="tab">History</button>
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="tab-content" id="nav-tabContent">
|
<div class="tab-content" id="nav-tabContent">
|
||||||
|
@ -58,9 +60,12 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{ $active = ""}}{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
<div class="tab-pane{{$active}}" id="nav-history" role="tabpanel">
|
{{ $history := history .Id }}
|
||||||
{{ template "events.html" events (history .Id) }}
|
{{- if gt (len $history) 0 }}
|
||||||
|
<div class="tab-pane{{$active}} pt-3" id="nav-history" role="tabpanel">
|
||||||
|
{{ template "events.html" events $history }}
|
||||||
</div>
|
</div>
|
||||||
|
{{ $active = ""}}{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ if world.MapReady }}
|
{{ if world.MapReady }}
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<nav>
|
<nav>
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
{{- range $t, $v := .}}
|
{{- range $t, $v := .}}
|
||||||
<button class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
<a class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
||||||
role="tab">{{$t}} ({{ len $v }})</button>
|
role="tab">{{$t}} ({{ len $v }})</a>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<nav>
|
<nav>
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
{{- range $t, $v := .}}
|
{{- range $t, $v := .}}
|
||||||
<button class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
<a class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
||||||
role="tab">{{$t}} ({{ len $v }})</button>
|
role="tab">{{$t}} ({{ len $v }})</a>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -10,6 +10,9 @@
|
||||||
</div>
|
</div>
|
||||||
{{initMap}}
|
{{initMap}}
|
||||||
{{ addWorldConstruction .Id }}
|
{{ addWorldConstruction .Id }}
|
||||||
|
{{- range .Parts }}
|
||||||
|
{{ addWorldConstruction . }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<h3>{{ title .Name }}</h3>
|
<h3>{{ title .Name }}</h3>
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<nav>
|
<nav>
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
{{- range $t, $v := .}}
|
{{- range $t, $v := .}}
|
||||||
<button class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
<a class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
||||||
role="tab">{{$t}} ({{ len $v }})</button>
|
role="tab">{{$t}} ({{ len $v }})</a>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<nav>
|
<nav>
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
{{- range $t, $v := .}}
|
{{- range $t, $v := .}}
|
||||||
<button class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
<a class="nav-link{{ ifFirst $ $t " active" }}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button"
|
||||||
role="tab">{{$t}} ({{ len $v }})</button>
|
role="tab">{{$t}} ({{ len $v }})</a>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Reference in New Issue