Updated themeing on 404 page

This commit is contained in:
Thomas Cole 2023-08-06 10:43:31 -04:00
parent abf4575151
commit 0ad815d516

View File

@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="icon" type="image/svg+xml" href="/icon-512.png" />
<meta name="generator" content={Astro.generator} />
<title>thomaspcole.com | 404</title>
@ -25,22 +25,25 @@
}
</style>
<script is:inline>
if (localStorage.getItem("theme") === null) {
document.documentElement.setAttribute("data-theme", "business");
if (!('theme' in localStorage)) {
localStorage.setItem("theme", "light")
}
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.classList.add('dark')
} else {
document.documentElement.setAttribute("data-theme", localStorage.getItem("theme"));
document.documentElement.classList.remove('dark')
}
</script>
</head>
<body class="w-full h-screen">
<div class="flex flex-col w-full h-screen text-center place-content-center">
<body class="w-full h-screen bg-white dark:bg-gray-900">
<div class="flex flex-col w-full h-screen text-center text-gray-900 place-content-center dark:text-white">
<h1 class="text-5xl">Uh Oh!</h1>
<p class="text-2xl">Sorry about that I can't seem to find what you are looking for.</p>
<br>
<a href="/" class="underline">Go Home</a>
</div>
</body>
</html>