From 32fa742cb0dac5aab70ad4e942b954159af39d79 Mon Sep 17 00:00:00 2001 From: Zeu Capua Date: Mon, 11 Mar 2024 00:43:37 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20implement=20crud/pin=20lists,=20err?= =?UTF-8?q?or=20toasts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/+layout.svelte | 10 +- src/routes/+page.svelte | 1 + src/routes/[id]/+page.svelte | 103 +++++++++++++++++-- static/{shooting-star.svg => check-line.svg} | 2 +- static/list-box-line.svg | 1 + static/pin-line.svg | 1 + static/shooting-star-line.svg | 1 + static/trash-line.svg | 1 + 8 files changed, 108 insertions(+), 12 deletions(-) rename static/{shooting-star.svg => check-line.svg} (57%) create mode 100644 static/list-box-line.svg create mode 100644 static/pin-line.svg create mode 100644 static/shooting-star-line.svg create mode 100644 static/trash-line.svg diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 08048c6..a58e282 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -7,11 +7,11 @@ import toast, { Toaster } from "svelte-french-toast"; import { persisted, pinned_list } from "$lib/stores.svelte"; - const theme = persisted("theme", "light"); + let theme = persisted("theme", "dark"); let is_menu_open = $state(false); - let theme_style = $derived(theme.value === "light" - ? "text-black absolute inset-0 -z-10 h-full w-full bg-white bg-[radial-gradient(#e5e7eb_1px,transparent_1px)] [background-size:16px_16px]" - : "text-white absolute top-0 z-[-2] h-screen w-screen bg-[#000000] bg-[radial-gradient(#ffffff33_1px,#00091d_1px)] bg-[size:20px_20px]" + let theme_style = $derived(theme.value === "dark" + ? "text-white absolute top-0 z-[-2] h-screen w-screen bg-[#000000] bg-[radial-gradient(#ffffff33_1px,#00091d_1px)] bg-[size:20px_20px]" + : "text-black absolute inset-0 -z-10 h-full w-full bg-white bg-[radial-gradient(#e5e7eb_1px,transparent_1px)] [background-size:16px_16px]" ); function comingSoon() { @@ -41,7 +41,7 @@ onclick={comingSoon} class="flex gap-2 text-start w-full h-full rounded-xl pl-2 pr-5 py-2 hover:bg-slate-500/10 transition-all duration-150 items-center" > - Item 1 + Item 1 Try a new list + + + + + {#if is_menu_open} + + {#each user_lists as user_list : List (user_list.id)} + + {/each} + + + {/if} + +
    {#each list.tasks as task (task.id)}
  • diff --git a/static/shooting-star.svg b/static/check-line.svg similarity index 57% rename from static/shooting-star.svg rename to static/check-line.svg index 51c1656..5c38d0a 100644 --- a/static/shooting-star.svg +++ b/static/check-line.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/static/list-box-line.svg b/static/list-box-line.svg new file mode 100644 index 0000000..e4a9dea --- /dev/null +++ b/static/list-box-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/pin-line.svg b/static/pin-line.svg new file mode 100644 index 0000000..a50976a --- /dev/null +++ b/static/pin-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/shooting-star-line.svg b/static/shooting-star-line.svg new file mode 100644 index 0000000..7eaf1f5 --- /dev/null +++ b/static/shooting-star-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/trash-line.svg b/static/trash-line.svg new file mode 100644 index 0000000..6b6fac8 --- /dev/null +++ b/static/trash-line.svg @@ -0,0 +1 @@ + \ No newline at end of file -- 2.51.2