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:
parent
894baef9c8
commit
11473a6b53
7 changed files with 152 additions and 82 deletions
31
src/components/Navbar.astro
Normal file
31
src/components/Navbar.astro
Normal 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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue