brand-site/src/components/Nav.astro
Scott Scoble 3705631510
Some checks are pending
Build and Deploy to Storj / build-and-deploy (push) Waiting to run
Initial commit: Astro speaker site with Forgejo Actions CI/CD
2026-04-28 20:52:10 -07:00

150 lines
2.9 KiB
Text

---
const navLinks = [
{ href: '/speaking', label: 'Speaking' },
{ href: '/consulting', label: 'Consulting' },
{ href: '/about', label: 'About' },
{ href: '/books', label: 'Books' },
{ href: '/blog', label: 'Blog' },
];
---
<nav class="site-nav" aria-label="Main navigation">
<div class="nav-container">
<a href="/" class="nav-logo">
<span class="logo-text">Scott Scoble</span>
</a>
<div class="nav-links">
{navLinks.map(link => (
<a href={link.href} class="nav-link">{link.label}</a>
))}
</div>
<a href="/speaking#book" class="nav-cta">Book Scott</a>
<button class="nav-menu-toggle" aria-label="Toggle menu" aria-expanded="false">
<span></span>
<span></span>
<span></span>
</button>
</div>
</nav>
<style>
.site-nav {
position: fixed;
top: 0;
left: 0;
right: 0;
background: rgba(250, 248, 245, 0.95);
backdrop-filter: blur(10px);
border-bottom: 1px solid var(--color-border-light);
z-index: 100;
}
.nav-container {
max-width: 1200px;
margin: 0 auto;
padding: 1rem 2rem;
display: flex;
align-items: center;
justify-content: space-between;
}
.nav-logo {
display: flex;
align-items: center;
gap: 0.75rem;
text-decoration: none;
}
.logo-text {
font-family: var(--font-heading);
font-size: 1.5rem;
font-weight: 600;
color: var(--color-brown-dark);
}
.nav-links {
display: flex;
gap: 2.5rem;
}
.nav-link {
color: var(--color-brown);
text-decoration: none;
font-weight: 500;
font-size: 0.9375rem;
padding: 0.5rem 0;
position: relative;
transition: color 0.2s ease;
}
.nav-link::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 2px;
background: var(--color-amber);
transition: width 0.2s ease;
}
.nav-link:hover {
color: var(--color-brown-dark);
}
.nav-link:hover::after {
width: 100%;
}
.nav-cta {
background: var(--color-amber);
color: white;
padding: 0.625rem 1.5rem;
border-radius: 6px;
text-decoration: none;
font-weight: 600;
font-size: 0.9375rem;
transition: all 0.2s ease;
}
.nav-cta:hover {
background: var(--color-amber-light);
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(200, 149, 46, 0.3);
}
.nav-menu-toggle {
display: none;
flex-direction: column;
gap: 4px;
background: none;
border: none;
padding: 0.5rem;
cursor: pointer;
}
.nav-menu-toggle span {
display: block;
width: 24px;
height: 2px;
background: var(--color-brown-dark);
transition: all 0.2s ease;
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.nav-cta {
display: none;
}
.nav-menu-toggle {
display: flex;
}
}
</style>