Commit 028aec2
Changed files (2)
src
components
layouts
src/components/Header.astro
@@ -0,0 +1,13 @@
+---
+import { SITE_CONFIG } from "@/config";
+---
+
+<header class="border-b-2 py-2">
+ <nav class="flex justify-between">
+ <a href="/" class="text-2xl">{SITE_CONFIG.title}</a>
+ <ul class="flex space-x-4 text-xl">
+ <li><a href="/posts">Posts</a></li>
+ <li><a href="/about">About</a></li>
+ </ul>
+ </nav>
+</header>
src/layouts/GlobalLayout.astro
@@ -1,5 +1,6 @@
---
import "@/styles/global.css";
+import Header from "@/components/Header.astro";
import { SITE_CONFIG } from "@/config";
interface Props {
@@ -21,6 +22,7 @@ const { title = SITE_CONFIG.title } = Astro.props;
<title>{title}</title>
</head>
<body>
+ <Header />
<slot />
</body>
</html>