@@ -38,34 +38,42 @@ const Header = () => {
3838 const languageLabel = getHomepageLocale ( currentLanguage ) === "zh" ? "中文" : "English" ;
3939
4040 const navItems = [
41- { label : content . nav . products , href : "# products" } ,
42- { label : content . nav . solutions , href : "# solutions" } ,
43- { label : content . nav . architecture , href : "# architecture" } ,
44- { label : content . nav . performance , href : "#performance" } ,
41+ { label : content . nav . products , href : "/ products" } ,
42+ { label : content . nav . solutions , href : "/ solutions" } ,
43+ { label : content . nav . architecture , href : "/ architecture" } ,
44+ { label : content . nav . performance , href : "/architecture #performance" } ,
4545 ] ;
4646
4747 const docItems = [
4848 { label : "FluxMQ Docs" , href : "https://doc.fluxmq.com" } ,
4949 { label : "FCP Docs" , href : "https://fcp.doc.fluxmq.com" } ,
50- { label : "Halia" , href : "#contact" } ,
50+ { label : "Demo Videos" , href : "/demos" } ,
51+ { label : "Halia" , href : "/products#halia" } ,
5152 ] ;
5253
5354 const openLink = ( href : string ) => {
54- if ( href . startsWith ( "#" ) ) {
55+ if ( href . startsWith ( "#" ) && document . querySelector ( href ) ) {
5556 document . querySelector ( href ) ?. scrollIntoView ( { behavior : "smooth" } ) ;
5657 setIsMenuOpen ( false ) ;
5758 return ;
5859 }
60+ if ( href . startsWith ( "/" ) ) {
61+ window . location . assign ( href ) ;
62+ setIsMenuOpen ( false ) ;
63+ return ;
64+ }
5965 window . open ( href , "_blank" ) ;
6066 } ;
6167
6268 return (
6369 < header className = "fixed left-0 right-0 top-0 z-50 border-b border-border/50 bg-background/82 backdrop-blur-md" >
64- < div className = "container mx-auto px-6 py-4" >
65- < nav className = "flex items-center justify-between" >
66- < a href = "/" className = "flex items-center gap-3" >
67- < img src = "/feixun.svg" alt = "Feixun Tech" className = "h-8 w-8 object-contain" />
68- < span className = "text-xl font-bold md:text-2xl" > { content . nav . brand } </ span >
70+ < div className = "container mx-auto px-4 py-4 sm:px-6" >
71+ < nav className = "flex min-w-0 items-center justify-between" >
72+ < a href = "/" className = "flex min-w-0 items-center gap-3" >
73+ < img src = "/feixun.svg" alt = "Feixun Tech" className = "h-8 w-8 shrink-0 object-contain" />
74+ < span className = "truncate text-lg font-bold sm:text-xl md:text-2xl" >
75+ { content . nav . brand }
76+ </ span >
6977 </ a >
7078
7179 < div className = "hidden items-center gap-7 lg:flex" >
@@ -121,15 +129,16 @@ const Header = () => {
121129 < Button variant = "ghost" onClick = { ( ) => window . open ( "https://github.com/quickmsg/fluxmq" , "_blank" ) } >
122130 { content . nav . github }
123131 </ Button >
124- < Button variant = "hero" onClick = { ( ) => openLink ( "# contact" ) } >
132+ < Button variant = "hero" onClick = { ( ) => openLink ( "/ contact" ) } >
125133 { content . nav . contact }
126134 </ Button >
127135 </ div >
128136
129137 < Button
130138 variant = "ghost"
131139 size = "icon"
132- className = "lg:hidden"
140+ className = "shrink-0 bg-primary text-primary-foreground shadow-primary hover:bg-primary/90 lg:hidden"
141+ aria-label = { isMenuOpen ? "Close navigation" : "Open navigation" }
133142 onClick = { ( ) => setIsMenuOpen ( ( open ) => ! open ) }
134143 >
135144 { isMenuOpen ? < X className = "h-5 w-5" /> : < Menu className = "h-5 w-5" /> }
@@ -179,7 +188,7 @@ const Header = () => {
179188 中文
180189 </ Button >
181190 </ div >
182- < Button className = "mt-3 justify-start" variant = "hero" onClick = { ( ) => openLink ( "# contact" ) } >
191+ < Button className = "mt-3 justify-start" variant = "hero" onClick = { ( ) => openLink ( "/ contact" ) } >
183192 { content . nav . contact }
184193 </ Button >
185194 </ div >
0 commit comments