add nav component to layout base

This commit is contained in:
chark1es 2024-12-04 23:34:02 -08:00
parent d9e0b9156a
commit 1fdd45316e
2 changed files with 27 additions and 22 deletions

View file

@ -1,22 +1,29 @@
---
import Navbar from "../components/Navbar.astro";
---
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} /> <meta name="generator" content={Astro.generator} />
<title>Astro Basics</title> <title>Astro Basics</title>
</head> </head>
<body class="bg-ieee_blue">
<slot /> <Navbar client:load />
</body>
<body class="bg-ieee_blue">
<slot />
</body>
</html> </html>
<style> <style>
html, html,
body { body {
margin: 0; margin: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
</style> </style>

View file

@ -1,12 +1,10 @@
--- ---
import Welcome from '../components/Welcome.astro'; import Welcome from "../components/Welcome.astro";
import Navbar from '../components/Navbar.astro'; import Navbar from "../components/Navbar.astro";
import Layout from '../layouts/Layout.astro'; import Layout from "../layouts/Layout.astro";
// Welcome to Astro! Wondering what to do next? Check out the Astro documentation at https://docs.astro.build // Welcome to Astro! Wondering what to do next? Check out the Astro documentation at https://docs.astro.build
// Don't want to use any of this? Delete everything in this file, the `assets`, `components`, and `layouts` directories, and start fresh. // Don't want to use any of this? Delete everything in this file, the `assets`, `components`, and `layouts` directories, and start fresh.
--- ---
<Layout> <Layout />
<Navbar />
</Layout>