Compare commits

...

3 Commits

Author SHA1 Message Date
kts of kettek ef2bbc9812 Don't mutate crumbs 2022-03-16 17:13:59 -07:00
kts of kettek 70f5d9eb15 Fix consumable header 2022-03-16 17:13:46 -07:00
kts of kettek efe7c07817 Enforce header colors 2022-03-16 17:13:35 -07:00
3 changed files with 16 additions and 7 deletions

View File

@ -43,7 +43,7 @@ module.exports = (plugin, app) => {
// build the location // build the location
let loc = '<a href="/">'+app.live.conf['shortname']+'</a>' let loc = '<a href="/">'+app.live.conf['shortname']+'</a>'
let crumbs = req.path.split('/') let crumbs = req.path.split('/')
let title = crumbs.reverse().filter(v=>v!==''&&v!=='db').map(v=>v.charAt(0).toUpperCase()+v.slice(1)).join(' - ') let title = [...crumbs].reverse().filter(v=>v!==''&&v!=='db').map(v=>v.charAt(0).toUpperCase()+v.slice(1)).join(' - ')
for (let i = 1; i < crumbs.length; i++) { for (let i = 1; i < crumbs.length; i++) {
if (crumbs[i] == '') continue if (crumbs[i] == '') continue
loc += ' &#8594 <a href="'+crumbs.slice(0,i).join('/')+'/'+crumbs[i]+'/">'+(crumbs[i].replace('-', ' '))+'</a>' loc += ' &#8594 <a href="'+crumbs.slice(0,i).join('/')+'/'+crumbs[i]+'/">'+(crumbs[i].replace('-', ' '))+'</a>'

View File

@ -152,13 +152,22 @@ h2 {
border-bottom: 1px solid #dde; border-bottom: 1px solid #dde;
color: #df3f3f; color: #df3f3f;
} }
h2 > a {
color: #df3f3f !important;
}
h3 { h3 {
border-bottom: 1px solid #dfdfef; border-bottom: 1px solid #dfdfef;
color: #dfdf5f; color: #dfdf5f;
} }
h3 > a {
color: #dfdf5f !important;
}
h4 { h4 {
color: #df9fdf; color: #df9fdf;
} }
h4 > a {
color: #df9fdf !important;
}
a { a {
transition: .05s ease-in-out; transition: .05s ease-in-out;
} }

View File

@ -104,7 +104,7 @@
#}} #}}
{{##def.consumables_table_entry:item: {{##def.consumables_table_entry:item:
<h2><a href="/db/consumables/{{=item.name || ''}}">{{=item.name || ''}}</a> <span data-json='{{=JSON.stringify(item)}}'></span> </h2> <h3><a href="/db/consumables/{{=item.name || ''}}">{{=item.name || ''}}</a> <span data-json='{{=JSON.stringify(item)}}'></span> </h3>
<p>{{=item.description || ''}}</p> <p>{{=item.description || ''}}</p>
{{?item.properties.length}} {{?item.properties.length}}
{{~item.properties :property}} {{~item.properties :property}}
@ -197,7 +197,7 @@
{{? it.results }} {{? it.results }}
{{#def.entry:it.results[0] || ''}} {{#def.entry:it.results[0] || ''}}
{{? it.collection === "gear" }} {{? it.collection === "gear" }}
<h1>Gear</h1> <h1><a href="/db/gear/">Gear</a></h1>
{{? it.type }} {{? it.type }}
{{? it.type === "weapon"}} {{? it.type === "weapon"}}
<h2>Weapons</h2> <h2>Weapons</h2>
@ -213,10 +213,10 @@
{{#def.misc_table:it.results || ''}} {{#def.misc_table:it.results || ''}}
{{?}} {{?}}
{{?? true }} {{?? true }}
<h2><a href="armor">Armor</a></h2> <h2><a href="armor/">Armor</a></h2>
<h2><a href="misc">Misc</a></h2> <h2><a href="misc/">Misc</a></h2>
<h2><a href="weapon">Weapons</a></h2> <h2><a href="weapon/">Weapons</a></h2>
<h2><a href="consumable">Consumables</a></h2> <h2><a href="consumable/">Consumables</a></h2>
{{?}} {{?}}
{{?? it.collection === "specimens" }} {{?? it.collection === "specimens" }}
{{? it.type }} {{? it.type }}