feat: add navigation items

This commit is contained in:
Devin Haska 2024-02-05 16:22:18 -08:00
parent 59ef51d6c6
commit 9dc3ddeec7
5 changed files with 26 additions and 4 deletions

View file

@ -1,4 +1,17 @@
module.exports = {
top: [],
top: [
{
text: "About",
url: "/about",
},
{
text: "Posts",
url: "/posts",
},
{
text: "Catalogue",
url: "/catalogue",
},
],
bottom: [],
};

View file

@ -1,5 +1,5 @@
<header class="navbar">
<nav class="wrapper flex items-center">
<header class="[ navbar ]">
<nav class="[ wrapper flex items-center justify-between ]">
<div class="[ flex items-center ] [ site-logo ]">
<a class="[ flex items-center justify-center ] [ logo ]" href="#">
<img src="/assets/images/logo.svg" width="32" height="32" alt="" />

View file

@ -1,4 +1,4 @@
<ul>
<ul class="[ flex ] [ links ]">
{% for item in navigation.top %}
<li>
<a class="nav" href="{{ item.url }}" {{ helpers.getLinkActiveState(item.url, page.url) | safe }}>{{ item.text }}</a>

View file

@ -7,3 +7,8 @@
top: 0;
z-index: 1;
}
.navbar .links {
list-style-type: none;
gap: 1.5rem;
}

View file

@ -14,3 +14,7 @@
.justify-center {
justify-content: center;
}
.justify-between {
justify-content: space-between;
}