From 1db44ec4133547e9cc2f351b56b1d59fafbc5002 Mon Sep 17 00:00:00 2001 From: seth Date: Wed, 10 Apr 2024 07:32:28 -0400 Subject: factor out components --- src/components/Footer.astro | 3 +++ src/components/Gifs.astro | 20 -------------------- src/components/Head.astro | 15 +++++++++++++++ src/components/Nav.astro | 22 ++++++++++++++++++++++ src/components/NavBar.astro | 20 -------------------- 5 files changed, 40 insertions(+), 40 deletions(-) create mode 100644 src/components/Footer.astro delete mode 100644 src/components/Gifs.astro create mode 100644 src/components/Head.astro create mode 100644 src/components/Nav.astro delete mode 100644 src/components/NavBar.astro (limited to 'src/components') diff --git a/src/components/Footer.astro b/src/components/Footer.astro new file mode 100644 index 0000000..9a8a667 --- /dev/null +++ b/src/components/Footer.astro @@ -0,0 +1,3 @@ + diff --git a/src/components/Gifs.astro b/src/components/Gifs.astro deleted file mode 100644 index b82230e..0000000 --- a/src/components/Gifs.astro +++ /dev/null @@ -1,20 +0,0 @@ ---- -import Picture from "astro/components/Picture.astro"; -import gifs from "@assets/gifs"; ---- - -
- { - gifs.map(({ image, alt }) => { - const img = ; - - if (image.src.includes("steam")) { - return {img}; - } else if (image.src.includes("poweredbynix")) { - return {img}; - } else { - return img; - } - }) - } -
diff --git a/src/components/Head.astro b/src/components/Head.astro new file mode 100644 index 0000000..b7cabaf --- /dev/null +++ b/src/components/Head.astro @@ -0,0 +1,15 @@ +--- +import "@fontsource-variable/noto-sans"; +import "@fontsource/noto-sans-mono"; + +import "@styles/main.css"; + +const { title, description } = Astro.props; +--- + + + {title} + + + + diff --git a/src/components/Nav.astro b/src/components/Nav.astro new file mode 100644 index 0000000..98f47ce --- /dev/null +++ b/src/components/Nav.astro @@ -0,0 +1,22 @@ +--- +interface NavLink { + name: string; + url: string; +} + +const links: NavLink[] = [ + { name: "home", url: "/" }, + { + name: "github", + url: "https://github.com/getchoo", + }, +]; +--- + + diff --git a/src/components/NavBar.astro b/src/components/NavBar.astro deleted file mode 100644 index b7c0216..0000000 --- a/src/components/NavBar.astro +++ /dev/null @@ -1,20 +0,0 @@ ---- -interface NavLink { - name: string; - url: string; -} - -const links: NavLink[] = [ - { name: "home", url: "/" }, - { - name: "github", - url: "https://github.com/getchoo", - }, -]; ---- - - - -
-- cgit v1.2.3