We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to change the logo based on the theme. For that, I wrote this component:
<script lang="ts"> import { onMount } from 'svelte' import { tick } from 'svelte/internal' import { theme } from '../store/theme' async function printTheme() { await tick(); console.log("Logo theme: " + $theme); } let path; theme.subscribe(theme => { switch (theme) { case 'dark': console.log("Dark theme triggered"); path = '/assets/Ein Sof Dark.svg'; // White logo case 'light': console.log("Light theme triggered"); path = '/assets/Ein Sof.svg'; // Black logo } printTheme(); }); onMount(() => { printTheme(); }); </script> <img class="header__logo-img" src={path} alt="The Ein Sof logo"/>
For some reason, the logo stays black, even when the theme is dark. This is the terminal output:
14:55:17 [200] / 27ms Dark theme triggered Light theme triggered Logo theme: dark
Can you perhaps help me understand how the theme works? Thanks.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm trying to change the logo based on the theme. For that, I wrote this component:
For some reason, the logo stays black, even when the theme is dark. This is the terminal output:
Can you perhaps help me understand how the theme works? Thanks.
The text was updated successfully, but these errors were encountered: