start work on Astro port
This commit is contained in:
52
src/layouts/BaseLayout.astro
Normal file
52
src/layouts/BaseLayout.astro
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
import '@styles/main.css';
|
||||
---
|
||||
|
||||
<style>
|
||||
.header {
|
||||
background: var(--primary-color-faded);
|
||||
}
|
||||
|
||||
nav {
|
||||
max-width: 30rem;
|
||||
margin: 0 auto;
|
||||
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
& a {
|
||||
flex: 1;
|
||||
max-width: 8rem;
|
||||
padding: 0.25rem 1rem;
|
||||
|
||||
font-size: 1.75rem;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
|
||||
&:hover {
|
||||
background: hsl(0deg 0% 0% / 10%);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<nav>
|
||||
<a href="/" data-astro-prefetch>Home</a>
|
||||
<a href="/posts" data-astro-prefetch>Posts</a>
|
||||
<a href="/about" data-astro-prefetch>About</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<main>
|
||||
<slot />
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user