refactor: add SubNav layout and per-subsite nav placeholders; switch Base to use SubNav
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user