diff --git a/src/components/Navigation.astro b/src/components/Navigation.astro index 3de6e8c..9e84b0a 100644 --- a/src/components/Navigation.astro +++ b/src/components/Navigation.astro @@ -1,100 +1,120 @@ --- import ThemeToggle from './ThemeToggle.astro'; + +const currentPath = Astro.url.pathname; + +// Navigation items +const navItems = [ + { href: '/', label: 'Home', icon: 'home' }, + { href: '/dev', label: 'Dev', icon: 'code' }, + { href: '/blog', label: 'Blog', icon: 'file' }, + { href: '/hubert', label: 'Hubert', icon: 'chat' }, + { href: '/contact', label: 'Contact', icon: 'mail' }, +]; + +// Check if a path is active +function isActive(href: string): boolean { + if (href === '/') { + return currentPath === '/'; + } + return currentPath.startsWith(href); +} --- -