From 8af65a6c305910a68988bb52aa38af73f7b5a4af Mon Sep 17 00:00:00 2001 From: Jake Hamilton Date: Thu, 24 Oct 2024 14:19:28 -0700 Subject: [PATCH] refactor(header): extract nav link component, add search widget stub, recolor header --- src/lib/components/Nav.svelte | 12 ++++++++++++ src/lib/components/NavLink.svelte | 10 ++++++++++ src/lib/components/Search.svelte | 7 +++++++ src/routes/+layout.svelte | 8 ++++---- src/routes/Nav.svelte | 17 ----------------- 5 files changed, 33 insertions(+), 21 deletions(-) create mode 100644 src/lib/components/Nav.svelte create mode 100644 src/lib/components/NavLink.svelte create mode 100644 src/lib/components/Search.svelte delete mode 100644 src/routes/Nav.svelte diff --git a/src/lib/components/Nav.svelte b/src/lib/components/Nav.svelte new file mode 100644 index 0000000..35599d5 --- /dev/null +++ b/src/lib/components/Nav.svelte @@ -0,0 +1,12 @@ + + +
+ + Docs + Try {DISTRO} +
diff --git a/src/lib/components/NavLink.svelte b/src/lib/components/NavLink.svelte new file mode 100644 index 0000000..2886a68 --- /dev/null +++ b/src/lib/components/NavLink.svelte @@ -0,0 +1,10 @@ + + + + {@render props.children?.()} + diff --git a/src/lib/components/Search.svelte b/src/lib/components/Search.svelte new file mode 100644 index 0000000..7e0ac06 --- /dev/null +++ b/src/lib/components/Search.svelte @@ -0,0 +1,7 @@ +
+ +
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 7cadc62..b753a9a 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -2,7 +2,7 @@ import { page } from "$app/stores"; import "../main.css"; import Footer from "./Footer.svelte"; - import Nav from "./Nav.svelte"; + import Nav from "$lib/components/Nav.svelte"; let { children } = $props(); globalThis.PKGS = "petalpkgs"; @@ -17,11 +17,11 @@ -
-