From 86eecefea4825ca83ffcb017d91f45a5a0ef7763 Mon Sep 17 00:00:00 2001 From: Jake Hamilton Date: Thu, 24 Oct 2024 14:19:28 -0700 Subject: [PATCH 1/6] refactor(header): extract nav link component, add search widget stub, recolor header refactor(search): darken colors --- 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..a9627d5 --- /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 @@ -
-