Improve light/dark theme toggle
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<script>
|
||||
export let mastered;
|
||||
</script>
|
||||
{#if mastered}
|
||||
👑
|
||||
{/if}
|
||||
@@ -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,
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user