diff options
| author | seth <[email protected]> | 2024-04-10 07:32:28 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-04-10 07:51:09 -0400 |
| commit | 1db44ec4133547e9cc2f351b56b1d59fafbc5002 (patch) | |
| tree | ce76ab4ffbeda7614faa85e543c7daf16a353fe2 /src/layouts/Index.astro | |
| parent | 4d93e97d6aa9442d91ad34df1819f10dc8f0ed9c (diff) | |
factor out components
Diffstat (limited to 'src/layouts/Index.astro')
| -rw-r--r-- | src/layouts/Index.astro | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/layouts/Index.astro b/src/layouts/Index.astro index b8e1945..cd7be22 100644 --- a/src/layouts/Index.astro +++ b/src/layouts/Index.astro @@ -1,11 +1,26 @@ --- import Base from "@layouts/Base.astro"; -import Gifs from "@components/Gifs.astro"; +import Picture from "astro/components/Picture.astro"; +import gifs from "@assets/gifs"; const { title, description } = Astro.props.frontmatter; --- <Base title={title} description={description}> <slot /> - <Gifs slot="extra_footer" /> + <div id="gifs"> + { + gifs.map(({ image, alt }) => { + const img = <Picture src={image} alt={alt} formats={["gif"]} />; + + if (image.src.includes("steam")) { + return <a href="https://dnsense.pub/">{img}</a>; + } else if (image.src.includes("poweredbynix")) { + return <a href="https://github.com/sakecode">{img}</a>; + } else { + return img; + } + }) + } + </div> </Base> |
