From d17bca56238e9ca326d60e58230d0d354f23bfe8 Mon Sep 17 00:00:00 2001 From: seth Date: Wed, 9 Oct 2024 10:59:13 -0400 Subject: back to astro for hopefully the last time (#146) --- src/components/Footer.astro | 25 ++++++++++++++++++ src/components/GifButtons.astro | 58 +++++++++++++++++++++++++++++++++++++++++ src/components/Head.astro | 22 ++++++++++++++++ src/components/Nav.astro | 18 +++++++++++++ 4 files changed, 123 insertions(+) create mode 100644 src/components/Footer.astro create mode 100644 src/components/GifButtons.astro create mode 100644 src/components/Head.astro create mode 100644 src/components/Nav.astro (limited to 'src/components') diff --git a/src/components/Footer.astro b/src/components/Footer.astro new file mode 100644 index 0000000..1eaed7e --- /dev/null +++ b/src/components/Footer.astro @@ -0,0 +1,25 @@ +--- +const commitSha = + import.meta.env.CF_PAGES_COMMIT_SHA || import.meta.env.COMMIT_SHA; +const repositoryUrl = "https://github.com/getchoo/website"; +--- + + diff --git a/src/components/GifButtons.astro b/src/components/GifButtons.astro new file mode 100644 index 0000000..3c88dbd --- /dev/null +++ b/src/components/GifButtons.astro @@ -0,0 +1,58 @@ +--- +import type { ImageMetadata } from "astro"; +import { Image } from "astro:assets"; + +const gifs = import.meta.glob<{ default: ImageMetadata }>( + "/src/assets/buttons/*.{gif,svg}", +); + +const gifButtons = [ + { buttonName: "acab.gif", altText: "ACAB!" }, + { + buttonName: "arnold.gif", + altText: "Hey Arnold!", + }, + { + buttonName: "capitalism.gif", + altText: "Let's crush capitalism!", + }, + { + buttonName: "legalize.gif", + altText: "Legalize marijuana now!", + }, + { + buttonName: "poweredbynix.svg", + altText: "Powered by NixOS", + link: "https://github.com/sakecode", + }, + { + buttonName: "pride.gif", + altText: "LGBTQ Pride now!", + }, + { + buttonName: "steam.gif", + altText: "Play on Steam!", + link: "https://dnsense.pub/", + }, + { buttonName: "weezer.gif", altText: "Weezer fan" }, +]; +--- + +
+ { + gifButtons.map(({ buttonName, altText, link }) => { + const imageTag = ( + {altText} + ); + + return ( +
+ {link ? {imageTag} : imageTag} +
+ ); + }) + } +
diff --git a/src/components/Head.astro b/src/components/Head.astro new file mode 100644 index 0000000..d355012 --- /dev/null +++ b/src/components/Head.astro @@ -0,0 +1,22 @@ +--- +import "@styles/style.scss"; +import "@fontsource/noto-sans"; +import notoSansWoff2 from "@fontsource/noto-sans/files/noto-sans-latin-400-normal.woff2"; + +const { title, description } = Astro.props; +--- + + + + {title || "Getchoo's Website"} + + + + + diff --git a/src/components/Nav.astro b/src/components/Nav.astro new file mode 100644 index 0000000..f122ee7 --- /dev/null +++ b/src/components/Nav.astro @@ -0,0 +1,18 @@ +--- +const navLinks = [ + { name: "Home", url: "/" }, + { name: "About Me", url: "/about-me" }, + { name: "Contact", url: "/contact" }, + { name: "GitHub", url: "https://github.com/getchoo" }, +]; +--- + + -- cgit v1.2.3