From bb7481670eedd4693f8e698261dc87243fd29448 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Tue, 10 Jun 2025 13:44:56 +0000 Subject: feat: add header component and update blog layout - Introduced a new Header component for site navigation. - Integrated Header into BaseLayout for consistent site structure. - Updated blog post layout to include the post title in a dedicated section. - Minor update to README for license clarity. --- README.md | 2 +- src/components/Header.astro | 22 ++++++++++++++++++++++ src/layouts/BaseLayout.astro | 5 +++++ src/pages/blog/[...slug].astro | 10 ++++------ 4 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 src/components/Header.astro diff --git a/README.md b/README.md index 01fe69d..da77701 100644 --- a/README.md +++ b/README.md @@ -51,4 +51,4 @@ Comments on the site are powered by [giscus.app](https://giscus.app) and stored ## License -This project is licensed under the [MIT License](LICENSE.txt). \ No newline at end of file +This project is licensed under the [MIT License](LICENSE.txt). diff --git a/src/components/Header.astro b/src/components/Header.astro new file mode 100644 index 0000000..b371be6 --- /dev/null +++ b/src/components/Header.astro @@ -0,0 +1,22 @@ + + +
+ Home + Blog +
diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index ca8826a..0209c58 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -1,6 +1,7 @@ --- import Analytics from "../components/Analytics.astro"; import Head from "../components/Head.astro"; +import Header from "../components/Header.astro"; import "../scss/global.scss"; type Props = { @@ -19,6 +20,10 @@ const { description, title } = Astro.props;
+
+
+
+
diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro index 41b0f5c..c4e542c 100644 --- a/src/pages/blog/[...slug].astro +++ b/src/pages/blog/[...slug].astro @@ -32,11 +32,13 @@ const formattedDate = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY"
+
+

{post.data.title}

+
+

- < Home -  •  Posted by {post.data.author} @@ -46,10 +48,6 @@ const formattedDate = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY"

-
-

{post.data.title}

-
-
-- cgit v1.2.3