From c3f6ddabb778182cb2cdf3087512db043c261303 Mon Sep 17 00:00:00 2001 From: Thuan Bui <9248622+10h30@users.noreply.github.com> Date: Mon, 22 Dec 2025 17:55:26 +0700 Subject: [PATCH] Refactor navigation: create Navigation component and update pages to use it --- src/components/Navigation.astro | 7 +++++++ src/pages/about.astro | 5 ++--- src/pages/blog.astro | 7 +++---- src/pages/index.astro | 11 ++++++----- 4 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 src/components/Navigation.astro diff --git a/src/components/Navigation.astro b/src/components/Navigation.astro new file mode 100644 index 0000000..c672240 --- /dev/null +++ b/src/components/Navigation.astro @@ -0,0 +1,7 @@ +--- + +--- + +Home +About +Blog diff --git a/src/pages/about.astro b/src/pages/about.astro index 716f2ca..db97b81 100644 --- a/src/pages/about.astro +++ b/src/pages/about.astro @@ -1,4 +1,5 @@ --- +import Navigation from "../components/Navigation.astro"; import "../styles/global.css"; const pageTitle = "About Me"; @@ -46,9 +47,7 @@ const textCase = "uppercase"; - Home - About - Blog +

{pageTitle}

... and my new Astro site!

diff --git a/src/pages/blog.astro b/src/pages/blog.astro index ea6c420..ecd8dee 100644 --- a/src/pages/blog.astro +++ b/src/pages/blog.astro @@ -1,5 +1,6 @@ --- - +import Navigation from "../components/Navigation.astro"; +import "../styles/global.css"; --- @@ -11,9 +12,7 @@ About - Home - About - Blog +

My Astro Learning Blog

This is where I will post about my journey learning Astro.