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/components | |
| parent | 4d93e97d6aa9442d91ad34df1819f10dc8f0ed9c (diff) | |
factor out components
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Footer.astro | 3 | ||||
| -rw-r--r-- | src/components/Gifs.astro | 20 | ||||
| -rw-r--r-- | src/components/Head.astro | 15 | ||||
| -rw-r--r-- | src/components/Nav.astro (renamed from src/components/NavBar.astro) | 12 |
4 files changed, 25 insertions, 25 deletions
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 @@ +<footer> + <a href="https://github.com/getchoo/website">source code</a> +</footer> 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"; ---- - -<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> 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; +--- +<head> + <meta charset="UTF-8" /> + <title>{title}</title> + <meta name="viewport" content="width=device-width,initial-scale=1" /> + <meta name="description" content={description} /> + <link rel="sitemap" href="/sitemap-index.xml" /> +</head> diff --git a/src/components/NavBar.astro b/src/components/Nav.astro index b7c0216..98f47ce 100644 --- a/src/components/NavBar.astro +++ b/src/components/Nav.astro @@ -13,8 +13,10 @@ const links: NavLink[] = [ ]; --- -<div id="nav_links"> - {links.map(({ name, url }) => <a href={url}>{name}</a>)} -</div> - -<hr /> +<nav> + <div id="nav_links"> + {links.map(({ name, url }) => <a href={url}>{name}</a>)} + </div> + + <hr /> +</nav> |
