🐛 fix themetoggle & styling to work correctly
Signed-off-by: SindreKjelsrud <sindre@kjelsrud.dev>
This commit is contained in:
parent
2e5b785932
commit
60e4862335
5 changed files with 100 additions and 100 deletions
|
@ -12,7 +12,7 @@ const { title, description, pubDate } = Astro.props;
|
|||
|
||||
const updateImageForTheme = () => {
|
||||
const currentTheme = document.documentElement.classList.contains('dark') ? 'dark' : 'light';
|
||||
jollyroger.src = currentTheme === 'dark' ? '/jollyroger_light.svg' : '/jollyroger_dark.svg';
|
||||
jollyroger.src = currentTheme === 'dark' ? '/jollyroger_dark.svg' : '/jollyroger_light.svg';
|
||||
};
|
||||
|
||||
updateImageForTheme();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue