diff --git a/src/lib/components/layout/Navbar.svelte b/src/lib/components/layout/Navbar.svelte new file mode 100644 index 0000000..83d28eb --- /dev/null +++ b/src/lib/components/layout/Navbar.svelte @@ -0,0 +1,37 @@ + + + + + + {#each LINKS as { href, text } (href)} + + + {"{"} + + {text} + + {"}"} + + + {/each} + + diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 5f88a65..83ea84c 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -2,7 +2,8 @@ import "../app.postcss"; import { Toaster } from "svelte-sonner"; import { page } from "$app/stores"; - import Navbar from "./components/Navbar.svelte"; + import Navbar from "$lib/components/layout/Navbar.svelte"; + let { children } = $props(); @@ -12,6 +13,5 @@ - - {@render children()} + diff --git a/src/routes/components/Navbar.svelte b/src/routes/components/Navbar.svelte deleted file mode 100644 index 042367a..0000000 --- a/src/routes/components/Navbar.svelte +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - {#each LINKS as { href, text }} - - {#if current_path === href} - {"{"} - {text} - {"}"} - {:else} - {text} - {/if} - - {/each} - - -