Spaces:
Runtime error
Runtime error
File size: 2,357 Bytes
5463318 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | import React from "react";
import { Link } from "react-router-dom";
import { BrainCircuit, Moon, Sun } from "lucide-react";
import { Button } from "../ui/Button";
import { useTheme } from "../../context/ThemeContext";
export default function Navbar() {
const { theme, toggleTheme } = useTheme();
return (
<header className="sticky top-0 z-50 w-full opacity-90 border-b border-white/10 bg-background/80 backdrop-blur-md">
<nav className="flex items-center justify-between px-6 py-4 max-w-7xl mx-auto">
<Link to="/" className="flex items-center gap-2">
<BrainCircuit className="h-8 w-8 text-primary" />
<span className="text-2xl font-bold tracking-tight text-foreground">ExamCraft.<span className="text-primary">AI</span></span>
</Link>
<div className="hidden md:flex gap-8 text-sm font-medium text-muted-foreground">
<Link to="/features" className="hover:text-primary transition-colors">Features</Link>
<Link to="/how-it-works" className="hover:text-primary transition-colors">How it Works</Link>
<Link to="/pricing" className="hover:text-primary transition-colors">Pricing</Link>
<Link to="/use-cases" className="hover:text-primary transition-colors">Use Cases</Link>
</div>
<div className="flex items-center gap-4">
<button
onClick={toggleTheme}
className="p-2 mr-2 rounded-full hover:bg-white/10 transition-colors text-muted-foreground hover:text-foreground hidden sm:block"
aria-label="Toggle theme"
>
{theme === "dark" ? <Sun size={20} className="text-amber-400 drop-shadow-[0_0_5px_rgba(251,191,36,0.5)]" /> : <Moon size={20} className="text-slate-600 drop-shadow-[0_0_5px_rgba(71,85,105,0.3)]" />}
</button>
<Link to="/login">
<Button variant="ghost">Log in</Button>
</Link>
<Link to="/register">
<Button className="glow-border shadow-lg">Get Started</Button>
</Link>
</div>
</nav>
</header>
);
}
|