64 lines
No EOL
1.6 KiB
Text
64 lines
No EOL
1.6 KiB
Text
---
|
|
//import "../global.css";
|
|
import Header from "../components/Header.astro";
|
|
import Footer from "../components/Footer.astro";
|
|
import Meta from "../components/Meta.astro";
|
|
|
|
import { urlfrag } from "../utils/path.js";
|
|
|
|
const { title, image } = Astro.props;
|
|
const base = import.meta.env.BASE_URL;
|
|
---
|
|
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<script is:inline>
|
|
function th() {
|
|
var cl = document.documentElement.classList;
|
|
af_enabled = 'af_enabled' in localStorage && localStorage.af_enabled === '1' ? true : false;
|
|
af_mode = 'af_mode' in localStorage ? localStorage.af_mode : '';
|
|
theme = 'theme' in localStorage ? localStorage.theme : '';
|
|
|
|
if (theme === '' || theme === 'system') {
|
|
theme = window.matchMedia('(prefers-color-scheme: dark)') ? 'dark' : 'light';
|
|
}
|
|
|
|
if (af_enabled) {
|
|
switch (af_mode) {
|
|
case 'df':
|
|
cl.add('df');
|
|
return;
|
|
case 'hc':
|
|
cl.add('hc');
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (theme === 'dark') {
|
|
cl.add('dark');
|
|
}
|
|
}
|
|
th();
|
|
</script>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta name="theme-color" content="#28303c" />
|
|
<Meta title={title} image={image} />
|
|
<link rel="icon" type="image/svg+xml" href={urlfrag(base, 'favicon.svg')} />
|
|
<link rel="icon" href={urlfrag(base, 'favicon.png')} />
|
|
<link rel="alternate" type="application/rss+xml" title="It's Just Us" href="/rss.xml" />
|
|
<title>{title}</title>
|
|
<script>
|
|
import { theme } from '../utils/theme.ts';
|
|
theme();
|
|
</script>
|
|
</head>
|
|
<body class="flex flex-col min-h-screen">
|
|
<Header />
|
|
<main class="grow">
|
|
<slot />
|
|
</main>
|
|
<Footer />
|
|
</body>
|
|
</html> |