feat: added layout and component for navigation

This commit is contained in:
Bart van der Braak 2023-07-20 08:57:28 +02:00
parent 01db60b009
commit a00b7d66d9
2 changed files with 61 additions and 0 deletions

17
src/routes/+layout.svelte Normal file
View file

@ -0,0 +1,17 @@
<!-- __layout.svelte -->
<script>
import Nav from '../components/Nav.svelte';
export let routes = [
{ url: "/", label: "Home" },
{ url: "/projects", label: "Projects" },
{ url: "/about", label: "About" },
// { url: "/blog", label: "Blog" },
{ url: "/contact", label: "Contact" }
]
</script>
<main>
<Nav {routes} />
<slot />
</main>