moar updates

This commit is contained in:
2025-04-05 19:47:36 -04:00
parent c89bc36fd7
commit 15d51f4e1e
195 changed files with 4943 additions and 2578 deletions

View File

@@ -1,9 +1,25 @@
<!-- TOP BEGIN -->
<% const getPageField=(field_name)=> {
return page[field_name] || site[field_name] || '';
<%
const getPageField=(field_name)=> {
return page[field_name] || site[field_name] || '';
},
getUrl = () => site.base_uri + (site.base_uri.endsWith('/') ? '' : '/') + page.path;
-%>
let title = page?.title ?? '';
if (page.title && page.section && !page.path.endsWith(`${page.section.replace(' ', '-')}/index.html`)) {
if (page.section === 'bestiary') {
title = `${title} (Creature)`;
}
else if (page.section === 'classes') {
title = `${title} (Class)`;
}
else if (page.section === 'races') {
title = `${title} (Race)`;
}
else if (page.section === 'magic items') {
title = `${title} (Magic Item)`;
}
}
-%>
<!doctype html>
<html class="no-js" lang="en" xmlns:fb="http://ogp.me/ns/fb#">
<head>
@@ -20,7 +36,7 @@
<base href="<%= getUrl() %>" />
<title>
<%= page.title ? page.title + ' | ' : '' %>
<%= title ? title + ' | ' : '' %>
<%= page.sub_title ? page.sub_title + ' | ' : '' %>
<%= site.title %>
</title>