mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00

* feat: initialize website project * feat: add initial homepage with download links * feat: initial download page * fix: linux icon color * feat: add mobile nav and github star button * feat: add older and nightly downloads page * feat: add supporters and footer * feat: add author details in about page * feat: add darkmode toggle for website * feat: add playstore and flathub download buttons and contribution button * feat: add blogs support * feat: remove netlify deploy config and add cloudflare config and favicons + manifest * chore: add robots.txt * feat: add spotube logo in navbar and fix build errors * chore: add gap
33 lines
692 B
Svelte
33 lines
692 B
Svelte
<script lang="ts">
|
|
import { SlideToggle } from '@skeletonlabs/skeleton';
|
|
import { persisted } from '$lib/persisted-store';
|
|
import { browser } from '$app/environment';
|
|
|
|
export const isDark = persisted('dark-mode', false);
|
|
|
|
$: {
|
|
if (browser) {
|
|
$isDark
|
|
? document.documentElement.classList.add('dark')
|
|
: document.documentElement.classList.remove('dark');
|
|
}
|
|
}
|
|
|
|
export let label: string | undefined;
|
|
</script>
|
|
|
|
<div class="inline-flex gap-2">
|
|
{#if label}
|
|
<label class="ps-4">{label}</label>
|
|
{/if}
|
|
<SlideToggle
|
|
active="bg-primary-backdrop-token"
|
|
size="sm"
|
|
name="dark-mode"
|
|
checked={$isDark}
|
|
on:change={() => {
|
|
isDark.update((prev) => !prev);
|
|
}}
|
|
/>
|
|
</div>
|