diff --git a/package.json b/package.json index fee3625..35a9fc0 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,9 @@ "@astrojs/check": "^0.5.10", "@astrojs/solid-js": "^4.0.1", "@astrojs/tailwind": "^5.1.0", + "@nanostores/solid": "^0.4.2", "astro": "^4.5.12", + "nanostores": "^0.10.3", "solid-js": "^1.8.16", "tailwindcss": "^3.4.3", "typescript": "^5.4.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e304c95..65ceeb6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,9 +14,15 @@ dependencies: '@astrojs/tailwind': specifier: ^5.1.0 version: 5.1.0(astro@4.5.12)(tailwindcss@3.4.3) + '@nanostores/solid': + specifier: ^0.4.2 + version: 0.4.2(nanostores@0.10.3)(solid-js@1.8.16) astro: specifier: ^4.5.12 version: 4.5.12(typescript@5.4.3) + nanostores: + specifier: ^0.10.3 + version: 0.10.3 solid-js: specifier: ^1.8.16 version: 1.8.16 @@ -1094,6 +1100,16 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: false + /@nanostores/solid@0.4.2(nanostores@0.10.3)(solid-js@1.8.16): + resolution: {integrity: sha512-8v32+C9KdRbnvP4x4Oiw/CtL1tZwbRxYfmFsPIY9PXevCgxSFnicG6VnLLtNAR7F0kl8Ec7OROHO34Ffv0KDzg==} + peerDependencies: + nanostores: '>=0.8.0' + solid-js: ^1.6.0 + dependencies: + nanostores: 0.10.3 + solid-js: 1.8.16 + dev: false + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -3212,6 +3228,11 @@ packages: hasBin: true dev: false + /nanostores@0.10.3: + resolution: {integrity: sha512-Nii8O1XqmawqSCf9o2aWqVxhKRN01+iue9/VEd1TiJCr9VT5XxgPFbF1Edl1XN6pwJcZRsl8Ki+z01yb/T/C2g==} + engines: {node: ^18.0.0 || >=20.0.0} + dev: false + /napi-build-utils@1.0.2: resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} requiresBuild: true diff --git a/public/favicon.svg b/public/favicon.svg index 3095a86..8bf2755 100644 --- a/public/favicon.svg +++ b/public/favicon.svg @@ -23,9 +23,9 @@ rx="150" ry="150" /> + aria-label="HD" /> diff --git a/src/components/Em.astro b/src/components/Em.astro new file mode 100644 index 0000000..2964c6f --- /dev/null +++ b/src/components/Em.astro @@ -0,0 +1,5 @@ +--- + +--- + + diff --git a/src/components/Header.astro b/src/components/Header.astro index 5f008be..b330e2d 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -3,7 +3,9 @@ import Nav from "@/components/Nav.tsx"; ---
-

+

J. Hunter DeLoche

diff --git a/src/components/Heading.astro b/src/components/Heading.astro deleted file mode 100644 index c6a7e68..0000000 --- a/src/components/Heading.astro +++ /dev/null @@ -1,7 +0,0 @@ ---- - ---- - -

- -

diff --git a/src/components/Nav.tsx b/src/components/Nav.tsx index 19f98cb..cae2275 100644 --- a/src/components/Nav.tsx +++ b/src/components/Nav.tsx @@ -1,4 +1,6 @@ -import { For, createSignal, onMount } from "solid-js"; +import { For, onMount } from "solid-js"; +import { useStore } from "@nanostores/solid"; +import { $currentPage } from "@/scripts/currentPage" interface Page { path: string, @@ -16,13 +18,12 @@ const activeClasses = "font-bold !text-foreground"; const Nav = () => { - const [currentPage, setCurrentPage] = createSignal(); + const currentPage = useStore($currentPage); onMount(() => { - setCurrentPage(window.location.pathname); + $currentPage.set(window.location.pathname); }); - return (