From 707aa66b35b4c18961c68aed6f1bb486e5f6183f Mon Sep 17 00:00:00 2001 From: elh Date: Sun, 16 Jun 2024 23:52:15 -0400 Subject: [PATCH] added navbar, boilerplate template made --- public/favicon.svg | 9 --- src/components/Nav-bar.astro | 8 +++ src/components/header.astro | 8 +++ src/layouts/Sitelayout.astro | 19 ++++++ src/pages/index.astro | 126 ++--------------------------------- src/styles/global.css | 67 +++++++++++++++++++ 6 files changed, 107 insertions(+), 130 deletions(-) delete mode 100644 public/favicon.svg create mode 100644 src/components/Nav-bar.astro create mode 100644 src/components/header.astro create mode 100644 src/layouts/Sitelayout.astro create mode 100644 src/styles/global.css diff --git a/public/favicon.svg b/public/favicon.svg deleted file mode 100644 index f157bd1..0000000 --- a/public/favicon.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/src/components/Nav-bar.astro b/src/components/Nav-bar.astro new file mode 100644 index 0000000..88b961a --- /dev/null +++ b/src/components/Nav-bar.astro @@ -0,0 +1,8 @@ +--- +--- + \ No newline at end of file diff --git a/src/components/header.astro b/src/components/header.astro new file mode 100644 index 0000000..ea9da73 --- /dev/null +++ b/src/components/header.astro @@ -0,0 +1,8 @@ +--- +import Navigation from "../components/Nav-bar.astro" +--- +
+ +
\ No newline at end of file diff --git a/src/layouts/Sitelayout.astro b/src/layouts/Sitelayout.astro new file mode 100644 index 0000000..8926653 --- /dev/null +++ b/src/layouts/Sitelayout.astro @@ -0,0 +1,19 @@ +--- +import Header from "../components/header.astro"; +import '../styles/global.css'; +const { pageTitle} = Astro.props +--- + + + + + + {pageTitle} + + + +
+

{pageTitle}

+ + + \ No newline at end of file diff --git a/src/pages/index.astro b/src/pages/index.astro index fb62628..325e07e 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,123 +1,7 @@ --- -import Layout from '../layouts/Layout.astro'; -import Card from '../components/Card.astro'; +import Layout from "../layouts/Sitelayout.astro"; +const pageTitle="home"; --- - - -
- -

Welcome to Astro

-

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

- -
-
- - + +

uwu

+
\ No newline at end of file diff --git a/src/styles/global.css b/src/styles/global.css new file mode 100644 index 0000000..2a1801b --- /dev/null +++ b/src/styles/global.css @@ -0,0 +1,67 @@ +html { + background-color: #f1f5f9; + font-family: sans-serif; + } + + body { + margin: 0 auto; + width: 100%; + max-width: 80ch; + padding: 1rem; + line-height: 1.5; + } + + * { + box-sizing: border-box; + } + + h1 { + margin: 1rem 0; + font-size: 2.5rem; + } + + /* nav styles */ + + .nav-links { + width: 100%; + top: 5rem; + left: 48px; + background-color: #ff9776; + display: none; + margin: 0; + } + + .nav-links a { + display: block; + text-align: center; + padding: 10px 0; + text-decoration: none; + font-size: 1.2rem; + font-weight: bold; + text-transform: uppercase; + } + + .nav-links a:hover, + .nav-links a:focus { + background-color: #ff9776; + } + + .expanded { + display: unset; + } + + @media screen and (min-width: 636px) { + .nav-links { + margin-left: 5em; + display: block; + position: static; + width: auto; + background: none; + } + + .nav-links a { + display: inline-block; + padding: 15px 20px; + } + + } \ No newline at end of file