Files
codey.lol/src/components/Footer.astro

32 lines
1008 B
Plaintext
Raw Normal View History

2025-06-18 07:46:59 -04:00
---
import { metaData, ENVIRONMENT, WHITELABELS } from "../config";
2025-06-22 09:50:36 -04:00
import RandomMsg from "../components/RandomMsg";
2025-07-19 22:57:35 -04:00
import { buildTime, buildNumber } from '../utils/buildTime.js';
2025-06-18 07:46:59 -04:00
const YEAR = new Date().getFullYear();
2025-08-14 11:40:02 -04:00
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);
2025-06-18 07:46:59 -04:00
---
<div class="footer">
{!whitelabel && <RandomMsg client:only="react" />}
<div style="margin-top: 15px; bottom: 0%">
2025-07-19 22:57:35 -04:00
<small>Build# {buildNumber}
<br>
Built: {buildTime} UTC</small>
</div>
</div>
2025-06-18 07:46:59 -04:00
<style>
@media screen and (max-width: 480px) {
article {
padding-top: 2rem;
padding-bottom: 4rem;
}
}
</style>