From a581480ae1cdf1c5019b42c5c8b57af4b226ce72 Mon Sep 17 00:00:00 2001 From: qowevisa Date: Fri, 8 Nov 2024 19:22:32 +0200 Subject: [PATCH] Refactored NavBar --- src/routes/+layout.svelte | 57 +++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 5 deletions(-) diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 415e6f4..700fde9 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -2,6 +2,7 @@ import '../app.css'; let { children } = $props(); import { page } from '$app/stores'; + const currentPath = $derived($page.url.pathname); // import { goto } from '$app/navigation'; // $effect(()=>{ @@ -9,15 +10,61 @@ // // goto("/login") // } // }); + const paths = [ + { + Path: "/ping", + Name: "ping", + }, + { + Path: "/test", + Name: "test", + }, + { + Path: "/test2", + Name: "test2", + } + ] {#if $page.url.pathname != "/login"} -