civ colors
This commit is contained in:
parent
185a62dcc0
commit
ce57fd472b
|
@ -87,6 +87,10 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Entity": [
|
"Entity": [
|
||||||
|
{
|
||||||
|
"Name": "Parent",
|
||||||
|
"Type": "int"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Name": "Necromancer",
|
"Name": "Necromancer",
|
||||||
"Type": "bool"
|
"Type": "bool"
|
||||||
|
|
|
@ -94,10 +94,13 @@ func hfIcon(x *HistoricalFigure) string {
|
||||||
case x.Necromancer:
|
case x.Necromancer:
|
||||||
return `<i class="fa-solid fa-book-skull fa-xs"></i> `
|
return `<i class="fa-solid fa-book-skull fa-xs"></i> `
|
||||||
case x.Werebeast:
|
case x.Werebeast:
|
||||||
return `<i class="fa-solid fa-moon fa-xs"></i> `
|
return `<i class="fa-solid fa-cloud-moon fa-xs"></i> `
|
||||||
case x.Vampire:
|
case x.Vampire:
|
||||||
return `<i class="fa-solid fa-droplet fa-xs"></i> `
|
return `<i class="fa-solid fa-droplet fa-xs"></i> `
|
||||||
}
|
}
|
||||||
|
if len(x.SiteLink) > 0 && x.SiteLink[0].LinkType == SiteLinkLinkType_Lair {
|
||||||
|
return `<i class="fa-solid fa-paw fa-xs"></i> `
|
||||||
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +141,23 @@ func (c *Context) artifact(id int) string {
|
||||||
|
|
||||||
func (c *Context) entity(id int) string {
|
func (c *Context) entity(id int) string {
|
||||||
if x, ok := c.World.Entities[id]; ok {
|
if x, ok := c.World.Entities[id]; ok {
|
||||||
return fmt.Sprintf(`<a class="entity" href="/entity/%d"><i class="%s fa-xs"></i> %s</a>`, x.Id(), x.Icon(), util.Title(x.Name()))
|
c := ""
|
||||||
|
switch x.Race {
|
||||||
|
case "dwarf":
|
||||||
|
c = ` style="color:#FFCC33"`
|
||||||
|
case "elf":
|
||||||
|
c = ` style="color:#99FF00"`
|
||||||
|
case "human":
|
||||||
|
c = ` style="color:#0000CC"`
|
||||||
|
case "kobold":
|
||||||
|
c = ` style="color:#333"`
|
||||||
|
case "goblin":
|
||||||
|
c = ` style="color:#CC0000"`
|
||||||
|
}
|
||||||
|
if x.Necromancer {
|
||||||
|
c = ` style="color:#A0A"`
|
||||||
|
}
|
||||||
|
return fmt.Sprintf(`<a class="entity" href="/entity/%d"><i class="%s fa-xs" %s></i> %s</a>`, x.Id(), x.Icon(), c, util.Title(x.Name()))
|
||||||
}
|
}
|
||||||
return "UNKNOWN ENTITY"
|
return "UNKNOWN ENTITY"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1992,6 +1992,7 @@ type Entity struct {
|
||||||
WorshipId []int `json:"worshipId" legend:"plus" related:""` // worship_id
|
WorshipId []int `json:"worshipId" legend:"plus" related:""` // worship_id
|
||||||
Leaders []*EntityLeader `json:"leaders" legend:"add" related:""` // Leaders
|
Leaders []*EntityLeader `json:"leaders" legend:"add" related:""` // Leaders
|
||||||
Necromancer bool `json:"necromancer" legend:"add" related:""` // Necromancer
|
Necromancer bool `json:"necromancer" legend:"add" related:""` // Necromancer
|
||||||
|
Parent int `json:"parent" legend:"add" related:""` // Parent
|
||||||
Sites []int `json:"sites" legend:"add" related:""` // Sites
|
Sites []int `json:"sites" legend:"add" related:""` // Sites
|
||||||
Wars []*HistoricalEventCollection `json:"wars" legend:"add" related:""` // Wars
|
Wars []*HistoricalEventCollection `json:"wars" legend:"add" related:""` // Wars
|
||||||
}
|
}
|
||||||
|
@ -1999,6 +2000,7 @@ type Entity struct {
|
||||||
func NewEntity() *Entity {
|
func NewEntity() *Entity {
|
||||||
return &Entity{
|
return &Entity{
|
||||||
Id_: -1,
|
Id_: -1,
|
||||||
|
Parent: -1,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func (x *Entity) Id() int { return x.Id_ }
|
func (x *Entity) Id() int { return x.Id_ }
|
||||||
|
@ -2033,6 +2035,9 @@ func (x *Entity) MarshalJSON() ([]byte, error) {
|
||||||
d["worshipId"] = x.WorshipId
|
d["worshipId"] = x.WorshipId
|
||||||
d["leaders"] = x.Leaders
|
d["leaders"] = x.Leaders
|
||||||
d["necromancer"] = x.Necromancer
|
d["necromancer"] = x.Necromancer
|
||||||
|
if x.Parent != -1 {
|
||||||
|
d["parent"] = x.Parent
|
||||||
|
}
|
||||||
d["sites"] = x.Sites
|
d["sites"] = x.Sites
|
||||||
d["wars"] = x.Wars
|
d["wars"] = x.Wars
|
||||||
return json.Marshal(d)
|
return json.Marshal(d)
|
||||||
|
|
|
@ -32,6 +32,12 @@ func (w *DfWorld) process() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, l := range e.EntityLink {
|
||||||
|
if l.Type_ == EntityEntityLinkType_PARENT {
|
||||||
|
e.Parent = l.Target
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
idx := slices.Index(e.Child, e.Id_)
|
idx := slices.Index(e.Child, e.Id_)
|
||||||
if idx != -1 {
|
if idx != -1 {
|
||||||
e.Child = append(e.Child[:idx], e.Child[idx+1:]...)
|
e.Child = append(e.Child[:idx], e.Child[idx+1:]...)
|
||||||
|
|
|
@ -86,6 +86,11 @@ td.object {
|
||||||
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.bg-light {
|
||||||
|
--bs-bg-opacity: 1;
|
||||||
|
background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #337ab7;
|
color: #337ab7;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,24 +7,25 @@
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
|
{{ $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}} ({{
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{
|
||||||
len $v
|
len $v }})</button>
|
||||||
}})</button>
|
{{ $active = ""}}{{- end}}
|
||||||
{{- end}}
|
|
||||||
{{- range $t, $v := .MusicalForms }}
|
{{- range $t, $v := .MusicalForms }}
|
||||||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len $v
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
|
||||||
}})</button>
|
$v }})</button>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- range $t, $v := .PoeticForms }}
|
{{- range $t, $v := .PoeticForms }}
|
||||||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len $v
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
|
||||||
}})</button>
|
$v }})</button>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="tab-content" id="nav-tabContent">
|
<div class="tab-content" id="nav-tabContent">
|
||||||
|
{{ $active := " active"}}
|
||||||
{{- range $t, $v := .DanceForms }}
|
{{- range $t, $v := .DanceForms }}
|
||||||
<div class="tab-pane active" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
|
<div class="tab-pane{{$active}}" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
|
||||||
<table class="table table-hover table-sm table-borderless">
|
<table class="table table-hover table-sm table-borderless">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="100%">Name</th>
|
<th width="100%">Name</th>
|
||||||
|
@ -38,9 +39,9 @@
|
||||||
{{- end}}{{- end}}
|
{{- end}}{{- end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- range $t, $v := .MusicalForms }}
|
{{- range $t, $v := .MusicalForms }}
|
||||||
<div class="tab-pane" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
|
<div class="tab-pane{{$active}}" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
|
||||||
<table class="table table-hover table-sm table-borderless">
|
<table class="table table-hover table-sm table-borderless">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="100%">Name</th>
|
<th width="100%">Name</th>
|
||||||
|
@ -54,9 +55,9 @@
|
||||||
{{- end}}{{- end}}
|
{{- end}}{{- end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- range $t, $v := .PoeticForms }}
|
{{- range $t, $v := .PoeticForms }}
|
||||||
<div class="tab-pane" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
|
<div class="tab-pane{{$active}}" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
|
||||||
<table class="table table-hover table-sm table-borderless object-table">
|
<table class="table table-hover table-sm table-borderless object-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="100%">Name</th>
|
<th width="100%">Name</th>
|
||||||
|
@ -70,7 +71,7 @@
|
||||||
{{- end}}{{- end}}
|
{{- end}}{{- end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
|
@ -9,6 +9,9 @@
|
||||||
{{- if .Profession }}
|
{{- if .Profession }}
|
||||||
of {{ .Profession }}s
|
of {{ .Profession }}s
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if ne .Parent -1 }}
|
||||||
|
of {{ entity .Parent }}
|
||||||
|
{{- end }}
|
||||||
{{- if and (eq .Type "religion") (gt (len .WorshipId) 0) }}
|
{{- if and (eq .Type "religion") (gt (len .WorshipId) 0) }}
|
||||||
centered around the worship of {{ hfList .WorshipId }}
|
centered around the worship of {{ hfList .WorshipId }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -24,26 +27,28 @@
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
|
{{ $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" role="tab">Sites</button>
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-leaders" type="button" role="tab">Leaders</button>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- if gt (len .Sites) 0 }}
|
{{- if gt (len .Sites) 0 }}
|
||||||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#nav-sites" type="button" role="tab">Sites</button>
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-sites" type="button" role="tab">Sites</button>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- if gt (len .HistfigId) 0 }}
|
{{- if gt (len .HistfigId) 0 }}
|
||||||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#nav-members" type="button" role="tab">Members</button>
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-members" type="button" role="tab">Members</button>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- if gt (len .Child) 0 }}
|
{{- if gt (len .Child) 0 }}
|
||||||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#nav-children" type="button" role="tab">Groups</button>
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-children" type="button" role="tab">Groups</button>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- if gt (len .Wars) 0 }}
|
{{- if gt (len .Wars) 0 }}
|
||||||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#nav-wars" type="button" role="tab">Wars</button>
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-wars" type="button" role="tab">Wars</button>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="tab-content" id="nav-tabContent">
|
<div class="tab-content" id="nav-tabContent">
|
||||||
|
{{ $active := " active"}}
|
||||||
{{- if gt (len .Leaders) 0 }}
|
{{- if gt (len .Leaders) 0 }}
|
||||||
<div class="tab-pane active" id="nav-leaders" role="tabpanel">
|
<div class="tab-pane{{$active}}" id="nav-leaders" role="tabpanel">
|
||||||
<table class="table table-hover table-sm table-borderless object-table">
|
<table class="table table-hover table-sm table-borderless object-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
|
@ -64,9 +69,9 @@
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- if gt (len .Sites) 0 }}
|
{{- if gt (len .Sites) 0 }}
|
||||||
<div class="tab-pane" id="nav-sites" role="tabpanel">
|
<div class="tab-pane{{$active}}" id="nav-sites" role="tabpanel">
|
||||||
<table class="table table-hover table-sm table-borderless">
|
<table class="table table-hover table-sm table-borderless">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
|
@ -80,9 +85,9 @@
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- if gt (len .HistfigId) 0 }}
|
{{- if gt (len .HistfigId) 0 }}
|
||||||
<div class="tab-pane" id="nav-members" role="tabpanel">
|
<div class="tab-pane{{$active}}" id="nav-members" role="tabpanel">
|
||||||
<table class="table table-hover table-sm table-borderless object-table">
|
<table class="table table-hover table-sm table-borderless object-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="100%">Type</th>
|
<th width="100%">Type</th>
|
||||||
|
@ -94,9 +99,9 @@
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- if gt (len .Child) 0 }}
|
{{- if gt (len .Child) 0 }}
|
||||||
<div class="tab-pane" id="nav-children" role="tabpanel">
|
<div class="tab-pane{{$active}}" id="nav-children" role="tabpanel">
|
||||||
<table class="table table-hover table-sm table-borderless object-table">
|
<table class="table table-hover table-sm table-borderless object-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="100%">Type</th>
|
<th width="100%">Type</th>
|
||||||
|
@ -108,9 +113,9 @@
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- if gt (len .Wars) 0 }}
|
{{- if gt (len .Wars) 0 }}
|
||||||
<div class="tab-pane" id="nav-wars" role="tabpanel">
|
<div class="tab-pane{{$active}}" id="nav-wars" role="tabpanel">
|
||||||
<table class="table table-hover table-sm table-borderless object-table">
|
<table class="table table-hover table-sm table-borderless object-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Year</th>
|
<th>Year</th>
|
||||||
|
@ -140,7 +145,7 @@
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h5>Events</h5>
|
<h5>Events</h5>
|
||||||
|
|
|
@ -7,28 +7,29 @@
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
|
{{ $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}} ({{
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{
|
||||||
len $v
|
len $v }})</button>
|
||||||
}})</button>
|
{{ $active = ""}}{{- end}}
|
||||||
{{- end}}
|
|
||||||
{{- range $t, $v := .Landmasses }}
|
{{- range $t, $v := .Landmasses }}
|
||||||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len $v
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
|
||||||
}})</button>
|
$v }})</button>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- range $t, $v := .MountainPeaks }}
|
{{- range $t, $v := .MountainPeaks }}
|
||||||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len $v
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
|
||||||
}})</button>
|
$v }})</button>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- range $t, $v := .Rivers }}
|
{{- range $t, $v := .Rivers }}
|
||||||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len $v
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-{{kebab $t}}" type="button" role="tab">{{$t}} ({{ len
|
||||||
}})</button>
|
$v }})</button>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="tab-content" id="nav-tabContent">
|
<div class="tab-content" id="nav-tabContent">
|
||||||
|
{{ $active := " active"}}
|
||||||
{{- range $t, $v := .Regions }}
|
{{- range $t, $v := .Regions }}
|
||||||
<div class="tab-pane active" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
|
<div class="tab-pane{{$active}}" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
|
||||||
<table class="table table-hover table-sm table-borderless">
|
<table class="table table-hover table-sm table-borderless">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="100%">Name</th>
|
<th width="100%">Name</th>
|
||||||
|
@ -42,9 +43,9 @@
|
||||||
{{- end}}{{- end}}
|
{{- end}}{{- end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- range $t, $v := .Landmasses }}
|
{{- range $t, $v := .Landmasses }}
|
||||||
<div class="tab-pane" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
|
<div class="tab-pane{{$active}}" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
|
||||||
<table class="table table-hover table-sm table-borderless">
|
<table class="table table-hover table-sm table-borderless">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="100%">Name</th>
|
<th width="100%">Name</th>
|
||||||
|
@ -58,9 +59,9 @@
|
||||||
{{- end}}{{- end}}
|
{{- end}}{{- end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- range $t, $v := .MountainPeaks }}
|
{{- range $t, $v := .MountainPeaks }}
|
||||||
<div class="tab-pane" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
|
<div class="tab-pane{{$active}}" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
|
||||||
<table class="table table-hover table-sm table-borderless object-table">
|
<table class="table table-hover table-sm table-borderless object-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="100%">Name</th>
|
<th width="100%">Name</th>
|
||||||
|
@ -74,9 +75,9 @@
|
||||||
{{- end}}{{- end}}
|
{{- end}}{{- end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- range $t, $v := .Rivers }}
|
{{- range $t, $v := .Rivers }}
|
||||||
<div class="tab-pane" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
|
<div class="tab-pane{{$active}}" id="nav-{{kebab $t}}" role="tabpanel" aria-labelledby="nav-home-tab">
|
||||||
<table class="table table-hover table-sm table-borderless object-table">
|
<table class="table table-hover table-sm table-borderless object-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="100%">Name</th>
|
<th width="100%">Name</th>
|
||||||
|
@ -90,7 +91,7 @@
|
||||||
{{- end}}{{- end}}
|
{{- end}}{{- end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
|
@ -1,7 +1,10 @@
|
||||||
{{ .Race }} {{ .Type }}
|
{{ .Race }}{{ if .Necromancer}} necromancer{{end}} {{ .Type }}
|
||||||
{{- if .Profession }}
|
{{- if .Profession }}
|
||||||
of {{ .Profession }}s
|
of {{ .Profession }}s
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if ne .Parent -1 }}
|
||||||
|
of {{ entity .Parent }}
|
||||||
|
{{- end }}
|
||||||
{{- if and (eq .Type "religion") (gt (len .WorshipId) 0) }}
|
{{- if and (eq .Type "religion") (gt (len .WorshipId) 0) }}
|
||||||
<br />centered around the worship of {{ hfList .WorshipId }}
|
<br />centered around the worship of {{ hfList .WorshipId }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -8,17 +8,21 @@
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
|
{{ $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" role="tab">Structures</button>
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-structures" type="button"
|
||||||
{{- end}}
|
role="tab">Structures</button>
|
||||||
|
{{ $active = ""}}{{- end}}
|
||||||
{{- if gt (len .SiteProperties) 0 }}
|
{{- if gt (len .SiteProperties) 0 }}
|
||||||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#nav-site-properties" type="button" role="tab">Properties</button>
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-site-properties" type="button"
|
||||||
{{- end}}
|
role="tab">Properties</button>
|
||||||
|
{{ $active = ""}}{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="tab-content" id="nav-tabContent">
|
<div class="tab-content" id="nav-tabContent">
|
||||||
|
{{ $active := " active"}}
|
||||||
{{- if gt (len .Structures) 0 }}
|
{{- if gt (len .Structures) 0 }}
|
||||||
<div class="tab-pane active" id="nav-structures" role="tabpanel">
|
<div class="tab-pane{{$active}}" id="nav-structures" role="tabpanel">
|
||||||
<table class="table table-hover table-sm table-borderless object-table">
|
<table class="table table-hover table-sm table-borderless object-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
|
@ -32,9 +36,9 @@
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
{{- if gt (len .SiteProperties) 0 }}
|
{{- if gt (len .SiteProperties) 0 }}
|
||||||
<div class="tab-pane" id="nav-site-properties" role="tabpanel">
|
<div class="tab-pane{{$active}}" id="nav-site-properties" role="tabpanel">
|
||||||
<table class="table table-hover table-sm table-borderless object-table">
|
<table class="table table-hover table-sm table-borderless object-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
|
@ -49,7 +53,7 @@
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{ $active = ""}}{{- end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h5 class="mt-3">Events</h5>
|
<h5 class="mt-3">Events</h5>
|
||||||
|
|
Loading…
Reference in New Issue