From d703a00538a3c5b71843a080651609399f548180 Mon Sep 17 00:00:00 2001 From: Sanyam Kapoor Date: Sun, 8 Dec 2024 04:31:01 -0500 Subject: [PATCH] consistent header and footers --- src/components/Footer.astro | 3 +- src/components/Header.astro | 95 ++++++++++++++++++--------------- src/components/MDPage.astro | 19 +++++-- src/components/THtml.astro | 49 ++--------------- src/content/config.ts | 1 + src/content/kb/index.md | 2 + src/content/kb/meta/about.md | 2 + src/pages/index.astro | 1 - src/pages/kb/index.astro | 1 - src/pages/thoughts/[page].astro | 18 +++---- src/styles/main.css | 3 +- 11 files changed, 89 insertions(+), 105 deletions(-) diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 3212237..db2ae0e 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -19,8 +19,7 @@ const { - -
-
+ + diff --git a/src/components/MDPage.astro b/src/components/MDPage.astro index c99b103..2313f15 100644 --- a/src/components/MDPage.astro +++ b/src/components/MDPage.astro @@ -12,14 +12,14 @@ const { page } = Astro.props; const { data: frontmatter } = page; const { Content } = await page.render(); -const { title, description, date, updated, area, comments } = frontmatter; +const { title, description, date, updated, area, comments, hideMetadata } = + frontmatter; --- @@ -66,10 +73,10 @@ const { title, description, date, updated, area, comments } = frontmatter; slot="head" />
-
+

{title}

{description}

-
+
{ updated || date ? ( @@ -98,6 +105,7 @@ const { title, description, date, updated, area, comments } = frontmatter;
+
{ @@ -107,5 +115,6 @@ const { title, description, date, updated, area, comments } = frontmatter;
) : null } +
diff --git a/src/components/THtml.astro b/src/components/THtml.astro index 7f6958f..49bd0ea 100644 --- a/src/components/THtml.astro +++ b/src/components/THtml.astro @@ -1,15 +1,14 @@ --- import { getEntry } from "astro:content"; -import { PiTreeBold } from "react-icons/pi"; -import { TfiThought } from "react-icons/tfi"; -import { IoSearch } from "react-icons/io5"; +import Header from "./Header.astro"; +import Footer from "./Footer.astro"; import Goatcounter from "./Goatcounter.astro"; import "@styles/main.css"; const { - frontmatter: { title, description, area, date, updated, keywords, authors }, + frontmatter: { title, description, date, keywords }, } = Astro.props; const canonicalURL = new URL(Astro.url.pathname, import.meta.env.SITE); @@ -52,52 +51,14 @@ const { ) : null } - { - updated ? ( - - ) : null - } - -
- -
+
+