Improve light/dark theme toggle

This commit is contained in:
2026-01-16 20:25:50 +01:00
parent eb6b6bccef
commit 1ba204fbdc
14 changed files with 190 additions and 65 deletions
+6
View File
@@ -0,0 +1,6 @@
<script>
export let mastered;
</script>
{#if mastered}
👑
{/if}
+13
View File
@@ -0,0 +1,13 @@
import CrownIcon from './components/CrownIcon.svelte';
// Expose a function to mount the CrownIcon component globally
// This allows Django templates to easily initialize Svelte components.
window.mountCrownIcon = (selector, props) => {
const target = document.querySelector(selector);
if (target) {
new CrownIcon({
target: target,
props: props,
});
}
};