sundays/src/layouts/Layout.astro

50 lines
1.4 KiB
Text
Raw Normal View History

2026-06-05 14:31:12 -06:00
---
//import "../global.css";
import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro";
import Meta from "../components/Meta.astro";
2026-06-05 14:31:12 -06:00
import { urlfrag } from "../utils/path.js";
const { title, image } = Astro.props;
2026-06-05 14:31:12 -06:00
const base = import.meta.env.BASE_URL;
---
<!doctype html>
<html lang="en">
2026-06-05 14:31:12 -06:00
<head>
2026-11-28 09:44:28 -07:00
<script is:inline>
var cl = document.documentElement.classList;
if ('theme' in localStorage || 'af_mode' in localStorage) {
if (localStorage.af_enabled === '1' && localStorage.af_mode === 'df') {
cl.add('df');
} else {
if (localStorage.theme === 'dark' || window.matchMedia('(prefers-color-scheme: dark)').matches) {
cl.add('dark');
}
if (localStorage.af_enabled === '1' && localStorage.af_mode == 'hc') {
cl.add('hc');
}
}
}
</script>
2026-06-05 14:31:12 -06:00
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2026-08-06 10:30:42 -06:00
<meta name="theme-color" content="#28303c" />
<Meta title={title} image={image} />
2026-06-05 14:31:12 -06:00
<link rel="icon" type="image/svg+xml" href={urlfrag(base, 'favicon.svg')} />
<link rel="icon" href={urlfrag(base, 'favicon.png')} />
<title>{title}</title>
<script>
2026-11-27 17:42:43 -07:00
import { theme } from '../utils/theme.ts';
theme();
</script>
2026-06-05 14:31:12 -06:00
</head>
<body class="flex flex-col min-h-screen">
<Header />
<main class="grow">
<slot />
</main>
<Footer />
</body>
</html>