Update layout
- Move navbar into layout - Add layout to 404 page
This commit is contained in:
parent
11473a6b53
commit
6917b0c1bd
3 changed files with 25 additions and 20 deletions
|
|
@ -5,6 +5,15 @@ export interface Props {
|
||||||
|
|
||||||
const { title } = Astro.props;
|
const { title } = Astro.props;
|
||||||
import "../assets/style/global.css";
|
import "../assets/style/global.css";
|
||||||
|
import Navbar from '../components/Navbar.astro';
|
||||||
|
|
||||||
|
const navbarLinks = [
|
||||||
|
{ href: "/", text: "Home" },
|
||||||
|
{ href: "/blog", text: "Blog" },
|
||||||
|
{ href: "/portafolio", text: "Portafolio" },
|
||||||
|
{ href: "/curriculum", text: "Curriculum" },
|
||||||
|
{ href: "/contact", text: "Contact" },
|
||||||
|
]
|
||||||
---
|
---
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
@ -22,8 +31,17 @@ import "../assets/style/global.css";
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<header>
|
||||||
|
<Navbar links={navbarLinks}/>
|
||||||
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<slot />
|
<slot />
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
header > :global(*) {
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1 +1,7 @@
|
||||||
<h1>not found</h1>
|
---
|
||||||
|
import Layout from '../layouts/Layout.astro';
|
||||||
|
---
|
||||||
|
|
||||||
|
<Layout title="Welcome to Astro.">
|
||||||
|
<h1>not found</h1>
|
||||||
|
</Layout>
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,9 @@
|
||||||
---
|
---
|
||||||
import Layout from '../layouts/Layout.astro';
|
import Layout from '../layouts/Layout.astro';
|
||||||
import Card from '../components/Card.astro';
|
import Card from '../components/Card.astro';
|
||||||
import Navbar from '../components/Navbar.astro';
|
|
||||||
|
|
||||||
const navbarLinks = [
|
|
||||||
{ href: "/", text: "Home" },
|
|
||||||
{ href: "/blog", text: "Blog" },
|
|
||||||
{ href: "/portafolio", text: "Portafolio" },
|
|
||||||
{ href: "/curriculum", text: "Curriculum" },
|
|
||||||
{ href: "/contact", text: "Contact" },
|
|
||||||
]
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title="Welcome to Astro.">
|
<Layout title="Welcome to Astro.">
|
||||||
<header>
|
|
||||||
<Navbar links={navbarLinks}/>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h1>Welcome to <span class="text-gradient">My Page :D</span></h1>
|
<h1>Welcome to <span class="text-gradient">My Page :D</span></h1>
|
||||||
<p class="instructions">
|
<p class="instructions">
|
||||||
|
|
@ -26,8 +12,3 @@ const navbarLinks = [
|
||||||
</p>
|
</p>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
||||||
<style>
|
|
||||||
header > :global(*) {
|
|
||||||
margin-left: auto;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue