refactor: add SubNav layout and per-subsite nav placeholders; switch Base to use SubNav

This commit is contained in:
2025-11-28 09:07:55 -05:00
parent de50889b2c
commit d8d6c5ec21
26 changed files with 1227 additions and 122 deletions

View File

@@ -1,15 +1,21 @@
---
import { metaData, ENVIRONMENT } from "../config";
import { metaData, ENVIRONMENT, WHITELABELS } from "../config";
import RandomMsg from "../components/RandomMsg";
import { buildTime, buildNumber } from '../utils/buildTime.js';
const YEAR = new Date().getFullYear();
const hostHeader = Astro.request?.headers?.get('host') || '';
const host = hostHeader.split(':')[0];
import { getSubsiteByHost } from '../utils/subsites.js';
import { getSubsiteByPath } from '../utils/subsites.js';
const detected = getSubsiteByHost(host) ?? getSubsiteByPath(Astro.url.pathname) ?? null;
const isReq = detected?.short === 'req';
const whitelabel = WHITELABELS[host] ?? (isReq ? WHITELABELS[detected.host] : null);
---
<div class="footer">
<RandomMsg client:only="react" />
{!whitelabel && <RandomMsg client:only="react" />}
<div style="margin-top: 15px; bottom: 0%">
<small>Build# {buildNumber}
<br>