jalil.arfaoui.net/src/layouts/main.astro

43 lines
1.3 KiB
Text
Raw Normal View History

2024-08-18 19:06:50 +02:00
---
import Footer from "../components/footer.astro";
import Header from "../components/header.astro";
import SquareLines from "../components/square-lines.astro";
const { title } = Astro.props;
---
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{title}</title>
<!-- Used to add dark mode right away, adding here prevents any flicker -->
<script is:inline>
if (typeof Storage !== 'undefined') {
var theme = localStorage.getItem('theme');
if (theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
2024-08-18 19:06:50 +02:00
document.documentElement.classList.add('dark')
}
}
</script>
<style>
.prose img {
border-radius: 20px;
}
</style>
<link rel="icon" type="image/x-icon" href="/assets/images/favicon.png" />
2024-08-18 19:06:50 +02:00
<script src="../assets/css/main.css"></script>
<Fragment set:html={import.meta.env.HEADER_INJECT} />
</head>
<body class="antialiased bg-white dark:bg-neutral-950">
<SquareLines />
<Header />
<slot />
<Footer />
<script src="../assets/js/main.js"></script>
<Fragment set:html={import.meta.env.FOOTER_INJECT} />
</body>
</html>