feat: Move theme into navbar

This commit is contained in:
Sidharth Vinod
2021-08-16 00:17:29 +05:30
parent 73fc573a2d
commit 2acde71f37
3 changed files with 4 additions and 3 deletions
+3
View File
@@ -7,6 +7,8 @@
</script>
<script lang="ts">
import Theme from './theme.svelte';
interface Link {
title: string;
href: string;
@@ -54,6 +56,7 @@
></label>
<input class="hidden" type="checkbox" id="menu-toggle" />
<Theme />
<div class="hidden lg:flex lg:items-center lg:w-auto w-full" id="menu">
<ul class="lg:flex items-center justify-between text-base pt-4 lg:pt-0">
{#each links as { title, href, icon }}
+1 -1
View File
@@ -38,7 +38,7 @@
</script>
<select
class="select select-bordered w-full max-w-xs"
class="select select-bordered"
bind:value={selectedTheme}
on:change={() => setTheme(selectedTheme)}>
{#each themes as theme}
-2
View File
@@ -4,7 +4,6 @@
import { onMount } from 'svelte';
import { loadingStateStore } from '$lib/util/loading';
import { themeStore } from '$lib/util/theme';
import Theme from '$lib/components/theme.svelte';
// This can be removed once https://github.com/sveltejs/kit/issues/1612 is fixed.
// Then move it into src and vite will bundle it automatically.
@@ -25,7 +24,6 @@
</script>
<main class="h-screen" data-theme={$themeStore}>
<Theme />
<slot />
</main>