From d32f40b61154c793134e0888017b7f29921ad8d0 Mon Sep 17 00:00:00 2001 From: elh Date: Sun, 16 Jun 2024 21:44:16 -0400 Subject: [PATCH 1/2] remove astro readme.md --- README.md | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index 1db3fb3..0000000 --- a/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# Astro Starter Kit: Basics - -```sh -npm create astro@latest -- --template basics -``` - -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics) -[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics) -[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json) - -> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! - -![just-the-basics](https://github.com/withastro/astro/assets/2244813/a0a5533c-a856-4198-8470-2d67b1d7c554) - -## 🚀 Project Structure - -Inside of your Astro project, you'll see the following folders and files: - -```text -/ -├── public/ -│ └── favicon.svg -├── src/ -│ ├── components/ -│ │ └── Card.astro -│ ├── layouts/ -│ │ └── Layout.astro -│ └── pages/ -│ └── index.astro -└── package.json -``` - -Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. - -There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. - -Any static assets, like images, can be placed in the `public/` directory. - -## 🧞 Commands - -All commands are run from the root of the project, from a terminal: - -| Command | Action | -| :------------------------ | :----------------------------------------------- | -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:4321` | -| `npm run build` | Build your production site to `./dist/` | -| `npm run preview` | Preview your build locally, before deploying | -| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | -| `npm run astro -- --help` | Get help using the Astro CLI | - -## 👀 Want to learn more? - -Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). From 707aa66b35b4c18961c68aed6f1bb486e5f6183f Mon Sep 17 00:00:00 2001 From: elh Date: Sun, 16 Jun 2024 23:52:15 -0400 Subject: [PATCH 2/2] 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