From 7b406fb8a1bc9f75b61c1e95de04d95d058ff5e7 Mon Sep 17 00:00:00 2001 From: sudoer777 Date: Tue, 30 May 2023 18:38:31 -0500 Subject: [PATCH] Add components for home page --- src/components/content/global/Footer.astro | 0 src/components/content/global/Navbar.astro | 18 +++++++++ src/components/content/index/About.astro | 0 src/components/content/index/Contact.astro | 0 src/components/content/index/Experience.astro | 0 src/components/content/index/Hero.astro | 0 src/components/content/index/Hobbies.astro | 0 src/components/content/index/Projects.astro | 0 src/components/content/index/Section.astro | 11 ++++++ src/content/global/Navbar.astro | 18 --------- src/layouts/{Basic.astro => Base.astro} | 2 +- src/pages/index.astro | 39 ++----------------- 12 files changed, 34 insertions(+), 54 deletions(-) create mode 100644 src/components/content/global/Footer.astro create mode 100644 src/components/content/global/Navbar.astro create mode 100644 src/components/content/index/About.astro create mode 100644 src/components/content/index/Contact.astro create mode 100644 src/components/content/index/Experience.astro create mode 100644 src/components/content/index/Hero.astro create mode 100644 src/components/content/index/Hobbies.astro create mode 100644 src/components/content/index/Projects.astro create mode 100644 src/components/content/index/Section.astro delete mode 100644 src/content/global/Navbar.astro rename src/layouts/{Basic.astro => Base.astro} (89%) diff --git a/src/components/content/global/Footer.astro b/src/components/content/global/Footer.astro new file mode 100644 index 0000000..e69de29 diff --git a/src/components/content/global/Navbar.astro b/src/components/content/global/Navbar.astro new file mode 100644 index 0000000..d06bca3 --- /dev/null +++ b/src/components/content/global/Navbar.astro @@ -0,0 +1,18 @@ +--- +const homeText = 'Ethan Reece' +const links = [ + { text: 'About Me', link: '/#about' }, + { text: 'Projects', link: '/#projects' }, + { text: 'Experience', link: '/#experience' }, + { text: 'Hobbies', link: '/#hobbies' }, + { text: 'Contact Me', link: '/#contact' }, +] +--- + +
+ +
diff --git a/src/components/content/index/About.astro b/src/components/content/index/About.astro new file mode 100644 index 0000000..e69de29 diff --git a/src/components/content/index/Contact.astro b/src/components/content/index/Contact.astro new file mode 100644 index 0000000..e69de29 diff --git a/src/components/content/index/Experience.astro b/src/components/content/index/Experience.astro new file mode 100644 index 0000000..e69de29 diff --git a/src/components/content/index/Hero.astro b/src/components/content/index/Hero.astro new file mode 100644 index 0000000..e69de29 diff --git a/src/components/content/index/Hobbies.astro b/src/components/content/index/Hobbies.astro new file mode 100644 index 0000000..e69de29 diff --git a/src/components/content/index/Projects.astro b/src/components/content/index/Projects.astro new file mode 100644 index 0000000..e69de29 diff --git a/src/components/content/index/Section.astro b/src/components/content/index/Section.astro new file mode 100644 index 0000000..55f7f25 --- /dev/null +++ b/src/components/content/index/Section.astro @@ -0,0 +1,11 @@ +--- +export interface Props { + background: boolean +} + +const { background } = Astro.props +--- + +
+ +
diff --git a/src/content/global/Navbar.astro b/src/content/global/Navbar.astro deleted file mode 100644 index c1c7a71..0000000 --- a/src/content/global/Navbar.astro +++ /dev/null @@ -1,18 +0,0 @@ ---- -const homeText = 'Ethan Reece' -const links = [ - { text: 'About Me', link: '#about' }, - { text: 'Projects', link: '#projects' }, - { text: 'Experience', link: '#experience' }, - { text: 'Hobbies', link: '#hobbies' }, - { text: 'Contact Me', link: '#contact' }, -] ---- - -
- -
diff --git a/src/layouts/Basic.astro b/src/layouts/Base.astro similarity index 89% rename from src/layouts/Basic.astro rename to src/layouts/Base.astro index 665bb76..d878f8f 100644 --- a/src/layouts/Basic.astro +++ b/src/layouts/Base.astro @@ -2,7 +2,7 @@ import Background from './properties/Background.astro' import Font from './properties/Font.astro' import Head from './properties/Head.astro' -import Navbar from '../content/global/Navbar.astro' +import Navbar from '../components/content/global/Navbar.astro' export interface Props { title: string diff --git a/src/pages/index.astro b/src/pages/index.astro index beadf13..8181ff4 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,38 +1,7 @@ --- -import Layout from '../layouts/Basic.astro' -import Card from '../components/Card.astro' +import Base from '../layouts/Base.astro' --- - -
-

Welcome to Astro

-

- To get started, open the directory src/pages in your project.
- Code Challenge: Tweak the "Welcome to Astro" message - above. -

-
    - - - - -
-
-
+ +

hello world

+