create basic components for index

- Updated layout
- Include CSS reset
- Include Catppuccin color variables
- Add basic styling
- Create navbar component
This commit is contained in:
Alexander Navarro 2023-08-13 12:32:28 -04:00
parent 894baef9c8
commit 11473a6b53
7 changed files with 152 additions and 82 deletions

View file

@ -0,0 +1,31 @@
---
interface Props {
links: { href: string, text: string }[];
}
const { links } = Astro.props;
---
<nav class="navbar navbar-expand-lg bg-body-tertiary">
<ul class="list-unstyle hstack">
{links.map(link =>(
<li class="nav-item">
<a class:list={"nav-link", { active: Astro.url.pathname === link.href}} href={link.href}>{link.text}</a>
</li>
))}
</ul>
</nav>
<style>
nav {
width: fit-content;
}
li > a {
padding: 0.25rem 0.5rem;
}
a {
text-decoration: none;
}
</style>