63 lines
2.0 KiB
TypeScript
63 lines
2.0 KiB
TypeScript
"use client"
|
|
|
|
import { useState } from "react"
|
|
import { Button } from "@/components/ui/button"
|
|
import { Menu, X } from "lucide-react"
|
|
|
|
export function Navigation() {
|
|
const [isOpen, setIsOpen] = useState(false)
|
|
|
|
const navItems = [
|
|
{ href: "#critique", label: "The Problem" },
|
|
{ href: "#mycoeconomics", label: "Mycoeconomics" },
|
|
{ href: "#alternatives", label: "Alternatives" },
|
|
{ href: "#action", label: "Take Action" },
|
|
]
|
|
|
|
return (
|
|
<nav className="fixed top-0 left-0 right-0 z-50 bg-background/80 backdrop-blur-md border-b border-primary/20">
|
|
<div className="container mx-auto px-4 py-4">
|
|
<div className="flex items-center justify-between">
|
|
<div className="text-2xl font-bold text-primary">🍄 TrippinBalls.lol</div>
|
|
|
|
{/* Desktop Navigation */}
|
|
<div className="hidden md:flex items-center space-x-6">
|
|
{navItems.map((item) => (
|
|
<a
|
|
key={item.href}
|
|
href={item.href}
|
|
className="text-foreground hover:text-primary transition-colors duration-200"
|
|
>
|
|
{item.label}
|
|
</a>
|
|
))}
|
|
</div>
|
|
|
|
{/* Mobile Menu Button */}
|
|
<Button variant="ghost" size="icon" className="md:hidden" onClick={() => setIsOpen(!isOpen)}>
|
|
{isOpen ? <X className="h-6 w-6" /> : <Menu className="h-6 w-6" />}
|
|
</Button>
|
|
</div>
|
|
|
|
{/* Mobile Navigation */}
|
|
{isOpen && (
|
|
<div className="md:hidden mt-4 pb-4 border-t border-primary/20">
|
|
<div className="flex flex-col space-y-4 pt-4">
|
|
{navItems.map((item) => (
|
|
<a
|
|
key={item.href}
|
|
href={item.href}
|
|
className="text-foreground hover:text-primary transition-colors duration-200"
|
|
onClick={() => setIsOpen(false)}
|
|
>
|
|
{item.label}
|
|
</a>
|
|
))}
|
|
</div>
|
|
</div>
|
|
)}
|
|
</div>
|
|
</nav>
|
|
)
|
|
}
|