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/GifButtons.astro | 58 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 src/components/GifButtons.astro (limited to 'src/components/GifButtons.astro') 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} +
+ ); + }) + } +
-- cgit v1.2.3