From 4b953d0c3be1d3c162f49612f21f5907ce64ce07 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 22 Jan 2024 15:15:18 +0000 Subject: Update navigation links and description is no longer hardcoded --- src/components/Navbar.astro | 10 +++++----- src/layouts/Default.astro | 5 +++-- src/layouts/Page.astro | 7 ++++--- src/pages/index.astro | 2 +- src/pages/projects.astro | 3 +-- 5 files changed, 14 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index 03bc27c..bd372e5 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -7,11 +7,11 @@ import "../styles/Navbar.css" diff --git a/src/layouts/Default.astro b/src/layouts/Default.astro index e28d85c..08ed4fb 100644 --- a/src/layouts/Default.astro +++ b/src/layouts/Default.astro @@ -1,9 +1,10 @@ --- interface Props { title: string; + description: string; } -const { title } = Astro.props; +const { title, description } = Astro.props; import { ViewTransitions } from 'astro:transitions'; import Navbar from '../components/Navbar.astro'; --- @@ -12,7 +13,7 @@ import Navbar from '../components/Navbar.astro'; - + diff --git a/src/layouts/Page.astro b/src/layouts/Page.astro index d2624c5..b0f202a 100644 --- a/src/layouts/Page.astro +++ b/src/layouts/Page.astro @@ -1,11 +1,12 @@ --- import Layout from './Default.astro'; +const { title, description } = Astro.props; --- - +
-

Test

-

Description

+

{title}

+

{description}

diff --git a/src/pages/index.astro b/src/pages/index.astro index 1f6061d..ab4f39b 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -6,7 +6,7 @@ import Profile from '../images/Alee.png'; import '../styles/index.css'; --- - +
Andrew Lee diff --git a/src/pages/projects.astro b/src/pages/projects.astro index 0313de2..fb61caf 100644 --- a/src/pages/projects.astro +++ b/src/pages/projects.astro @@ -1,6 +1,5 @@ --- import Page from "../layouts/Page.astro"; --- - - + -- cgit v1.2.3