summaryrefslogtreecommitdiff
path: root/src/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'src/layouts')
-rw-r--r--src/layouts/Base.astro27
-rw-r--r--src/layouts/Index.astro19
-rw-r--r--src/layouts/Page.astro4
3 files changed, 26 insertions, 24 deletions
diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro
index 6ec66c5..c60347c 100644
--- a/src/layouts/Base.astro
+++ b/src/layouts/Base.astro
@@ -1,37 +1,22 @@
---
-import "@fontsource-variable/noto-sans";
-import "@fontsource/noto-sans-mono";
-
-import NavBar from "@components/NavBar.astro";
-import "@styles/main.css";
+import Footer from "@components/Footer.astro";
+import Head from "@components/Head.astro";
+import Nav from "@components/Nav.astro";
const { title, description } = Astro.props.frontmatter || Astro.props;
---
<!doctype html>
<html lang="en">
- <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>
-
+ <Head title={title} description={description} />
<body>
<h1><b>getchoo's website 🚀</b></h1>
<slot name="nav">
- <nav>
- <slot name="extra_nav" />
- <NavBar />
- </nav>
+ <Nav />
</slot>
<slot />
<slot name="footer">
- <footer>
- <slot name="extra_footer" />
- <a href="https://github.com/getchoo/website">source code</a>
- </footer>
+ <Footer />
</slot>
</body>
</html>
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>
diff --git a/src/layouts/Page.astro b/src/layouts/Page.astro
index 72512e2..e740d36 100644
--- a/src/layouts/Page.astro
+++ b/src/layouts/Page.astro
@@ -4,5 +4,7 @@ const { title, description } = Astro.props.frontmatter || Astro.props;
---
<Base title={title} description={description}>
- <slot />
+ <div class="blogpost">
+ <slot />
+ </div>
</Base>