🔥 Remove lightmode

Signed-off-by: SindreKjelsrud <sindre@kjelsrud.dev>
This commit is contained in:
SindreKjelsrud 2025-04-01 19:38:03 +02:00
parent 15b78a4e3e
commit c0260b813b
Signed by: sidski
GPG key ID: D2BBDF3EDE6BA9A6
8 changed files with 11 additions and 222 deletions

View file

@ -7,22 +7,6 @@ type Props = CollectionEntry<'blog'>['data'];
const { title, description, pubDate } = Astro.props;
---
<script type="module" client:load>
const jollyroger = document.getElementById('jr');
const updateImageForTheme = () => {
const currentTheme = document.documentElement.classList.contains('dark') ? 'dark' : 'light';
jollyroger.src = currentTheme === 'dark' ? '/img/jollyroger_dark.svg' : '/img/jollyroger_light.svg';
};
updateImageForTheme();
const themeToggle = document.getElementById('themeToggle');
if (themeToggle) {
themeToggle.addEventListener('click', updateImageForTheme);
}
</script>
<BlogContainer>
<main class="flex flex-col flex-1 mb-auto break-words mt-4">
<article class="flex flex-col gap-1">