From d8a20e3032a0ce97b6ddc29840e135eda9b3f43c Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 8 Apr 2024 22:58:22 -0400 Subject: refactor; use plain css --- src/components/Footer.astro | 30 ------------------------------ src/components/Gifs.astro | 20 ++++++++++++++++++++ src/components/Head.astro | 31 ------------------------------- src/components/Nav.astro | 30 ------------------------------ src/components/NavBar.astro | 20 ++++++++++++++++++++ 5 files changed, 40 insertions(+), 91 deletions(-) delete mode 100644 src/components/Footer.astro create mode 100644 src/components/Gifs.astro delete mode 100644 src/components/Head.astro delete mode 100644 src/components/Nav.astro create mode 100644 src/components/NavBar.astro (limited to 'src/components') diff --git a/src/components/Footer.astro b/src/components/Footer.astro deleted file mode 100644 index 7897b8d..0000000 --- a/src/components/Footer.astro +++ /dev/null @@ -1,30 +0,0 @@ ---- -import { execa } from "execa"; -import Picture from "astro/components/Picture.astro"; -import gifs from "@assets/gifs"; - -const { stdout: gitCommit } = await execa("git", ["rev-parse", "HEAD"]); ---- - - diff --git a/src/components/Gifs.astro b/src/components/Gifs.astro new file mode 100644 index 0000000..b82230e --- /dev/null +++ b/src/components/Gifs.astro @@ -0,0 +1,20 @@ +--- +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 deleted file mode 100644 index f05e862..0000000 --- a/src/components/Head.astro +++ /dev/null @@ -1,31 +0,0 @@ ---- -import "@fontsource-variable/noto-sans"; -import "@fontsource/noto-sans-mono"; -const { title, description } = Astro.props; ---- - - - - {title} - - - - - diff --git a/src/components/Nav.astro b/src/components/Nav.astro deleted file mode 100644 index f427548..0000000 --- a/src/components/Nav.astro +++ /dev/null @@ -1,30 +0,0 @@ ---- -import config from "@root/astro.config.ts"; - -interface NavLink { - name: string; - url: string; -} - -const minifluxUrl = process.env.MINIFLUX_URL || `https://miniflux.${Astro.url.hostname || config.site}`; - -const links: NavLink[] = [ - { name: "home", url: "/" }, - { - name: "miniflux", - url: minifluxUrl, - }, - { - name: "github", - url: "https://github.com/getchoo", - }, -]; ---- - - diff --git a/src/components/NavBar.astro b/src/components/NavBar.astro new file mode 100644 index 0000000..b7c0216 --- /dev/null +++ b/src/components/NavBar.astro @@ -0,0 +1,20 @@ +--- +interface NavLink { + name: string; + url: string; +} + +const links: NavLink[] = [ + { name: "home", url: "/" }, + { + name: "github", + url: "https://github.com/getchoo", + }, +]; +--- + + + +
-- cgit v1.2.3