11import { useState , useEffect } from 'react'
22import { useNavigate } from 'react-router-dom'
3+ import { ThemeToggle } from './ThemeToggle'
4+ import { GitHubStars } from './GitHubStars'
5+ import { MobileMenu } from './MobileMenu'
36
47interface NavbarProps {
58 minimal ?: boolean
69}
710
11+ const NAV_LINKS = [
12+ { label : 'Features' , href : '#features' } ,
13+ { label : 'Pricing' , href : '#pricing' } ,
14+ { label : 'Docs' , href : '/docs' } ,
15+ ]
16+
817export function Navbar ( { minimal } : NavbarProps ) {
918 const navigate = useNavigate ( )
1019 const [ scrolled , setScrolled ] = useState ( false )
@@ -19,35 +28,58 @@ export function Navbar({ minimal }: NavbarProps) {
1928 < nav className = { `
2029 fixed top-0 left-0 right-0 z-50 transition-all duration-300
2130 ${ scrolled
22- ? 'bg-black /80 backdrop-blur-xl border-b border-white/[0.06]'
31+ ? 'bg-background /80 backdrop-blur-xl border-b border-white/[0.06] dark:border-white/[0.06] light:border-black /[0.06]'
2332 : 'bg-transparent'
2433 }
2534 ` } >
26- < div className = "max-w-5xl mx-auto px-6 py-4 flex items-center justify-between" >
35+ < div className = "max-w-6xl mx-auto px-4 sm: px-6 py-4 flex items-center justify-between" >
2736 { /* Logo */ }
28- < a href = "/" className = "flex items-center gap-3 group" >
29- < div className = "w-8 h-8 rounded-lg bg-gradient-to-br from-blue-400 to-blue-600 flex items-center justify-center" >
37+ < a href = "/" className = "flex items-center gap-2.5 group" >
38+ < div className = "w-8 h-8 rounded-lg bg-gradient-to-br from-accent to-blue-600 flex items-center justify-center shadow-lg shadow-accent/20 " >
3039 < span className = "text-white font-bold text-sm" > CI</ span >
3140 </ div >
32- < span className = "font-semibold text-white " > CodeIntel</ span >
41+ < span className = "font-semibold text-foreground " > CodeIntel</ span >
3342 </ a >
3443
35- { /* Right side */ }
44+ { /* Desktop nav */ }
3645 { ! minimal && (
37- < div className = "flex items-center gap-2" >
38- < button
39- onClick = { ( ) => navigate ( '/login' ) }
40- className = "px-4 py-2 text-sm text-zinc-400 hover:text-white transition-colors"
41- >
42- Sign in
43- </ button >
44- < button
45- onClick = { ( ) => navigate ( '/signup' ) }
46- className = "px-4 py-2 text-sm font-medium text-white rounded-lg bg-white/10 hover:bg-white/15 border border-white/10 transition-all"
47- >
48- Get started
49- </ button >
50- </ div >
46+ < >
47+ < div className = "hidden md:flex items-center gap-1" >
48+ { NAV_LINKS . map ( link => (
49+ < a
50+ key = { link . href }
51+ href = { link . href }
52+ className = "px-3 py-2 text-sm text-muted-foreground hover:text-foreground transition-colors rounded-lg hover:bg-white/5 dark:hover:bg-white/5 light:hover:bg-black/5"
53+ >
54+ { link . label }
55+ </ a >
56+ ) ) }
57+ </ div >
58+
59+ < div className = "hidden md:flex items-center gap-3" >
60+ < GitHubStars />
61+ < ThemeToggle />
62+ < div className = "w-px h-6 bg-white/10 dark:bg-white/10 light:bg-black/10" />
63+ < button
64+ onClick = { ( ) => navigate ( '/login' ) }
65+ className = "px-3 py-2 text-sm text-muted-foreground hover:text-foreground transition-colors"
66+ >
67+ Sign in
68+ </ button >
69+ < button
70+ onClick = { ( ) => navigate ( '/signup' ) }
71+ className = "px-4 py-2 text-sm font-medium text-white rounded-lg bg-accent hover:bg-accent/90 transition-colors shadow-lg shadow-accent/20"
72+ >
73+ Get Started
74+ </ button >
75+ </ div >
76+
77+ { /* Mobile */ }
78+ < div className = "flex md:hidden items-center gap-2" >
79+ < ThemeToggle />
80+ < MobileMenu onNavigate = { navigate } />
81+ </ div >
82+ </ >
5183 ) }
5284 </ div >
5385 </ nav >
0 commit comments