From 44eabc1a094a80371a6c98b905ee7bfe628370e9 Mon Sep 17 00:00:00 2001 From: Blboun3 <62328614+Blboun3@users.noreply.github.com> Date: Tue, 26 Mar 2024 21:12:10 +0100 Subject: [PATCH] Summary (required) --- src/components/Navbar.astro | 23 +++++++++++++++++++++++ src/components/Navlink.astro | 6 ++++++ src/consts.js | 2 -- src/layouts/MainLayout.astro | 5 ++++- src/pages/[lang]/about/index.astro | 16 ++++++++++++++++ src/pages/[lang]/blog/index.astro | 16 ++++++++++++++++ src/pages/[lang]/index.astro | 11 ++++------- 7 files changed, 69 insertions(+), 10 deletions(-) create mode 100644 src/components/Navbar.astro create mode 100644 src/components/Navlink.astro delete mode 100644 src/consts.js create mode 100644 src/pages/[lang]/about/index.astro create mode 100644 src/pages/[lang]/blog/index.astro diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro new file mode 100644 index 0000000..72653f2 --- /dev/null +++ b/src/components/Navbar.astro @@ -0,0 +1,23 @@ +--- +import Navlink from "./Navlink.astro"; +const links = [ + { + display: "Home", + icon: "H", + href: "/" + },{ + display: "Blog", + icon: "B", + href: "/blog" + }, { + display: "About", + icon: "A", + href: "/about" + } +]; +--- + \ No newline at end of file diff --git a/src/components/Navlink.astro b/src/components/Navlink.astro new file mode 100644 index 0000000..00797c8 --- /dev/null +++ b/src/components/Navlink.astro @@ -0,0 +1,6 @@ +--- +import { getRelativeLocaleUrl } from "astro:i18n"; + +const { display, href, icon, isActive } = Astro.props; +--- +{icon}{display} diff --git a/src/consts.js b/src/consts.js deleted file mode 100644 index cee6024..0000000 --- a/src/consts.js +++ /dev/null @@ -1,2 +0,0 @@ -export const SITE_TITLE = 'Astro Blog'; -export const SITE_DESCRIPTION = 'Welcome to my website!'; \ No newline at end of file diff --git a/src/layouts/MainLayout.astro b/src/layouts/MainLayout.astro index 3be618c..c5c52b8 100644 --- a/src/layouts/MainLayout.astro +++ b/src/layouts/MainLayout.astro @@ -1,5 +1,7 @@ --- const { title, description, lang } = Astro.props; +import Navbar from "../components/Navbar.astro"; +import "../style/index.css"; --- @@ -9,7 +11,8 @@ const { title, description, lang } = Astro.props;
- {Astro.url.toString()} -