1+ // src/components/Header.tsx
12import { Button } from "@/components/ui/button" ;
23import { Github , Download , ExternalLink } from "lucide-react" ;
34import { Link } from "react-router-dom" ;
45
5- const Header = ( ) => {
6+ // NEW: add a prop type
7+ type HeaderProps = {
8+ minimal ?: boolean ; // when true, hide nav + buttons
9+ } ;
10+
11+ const Header = ( { minimal = false } : HeaderProps ) => {
612 return (
713 < header className = "sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60" >
814 { /* Grid: [logo] [centered nav] [buttons] */ }
@@ -18,60 +24,64 @@ const Header = () => {
1824 </ div >
1925
2026 { /* Center: Nav (truly centered, independent of side widths) */ }
21- < nav className = "hidden md:flex justify-self-center items-center gap-6 min-w-0" >
22- < a href = "#features" className = "text-muted-foreground hover:text-foreground transition-colors" >
23- Features
24- </ a >
25- < a href = "#download" className = "text-muted-foreground hover:text-foreground transition-colors" >
26- Download
27- </ a >
28- < a
29- href = "https://github.com/your-repo"
30- className = "text-muted-foreground hover:text-foreground transition-colors"
31- target = "_blank"
32- rel = "noopener noreferrer"
33- >
34- GitHub
35- </ a >
36- < a href = "#about" className = "text-muted-foreground hover:text-foreground transition-colors" >
37- About
38- </ a >
39- < Link to = "/docs" className = "text-muted-foreground hover:text-foreground transition-colors" >
40- Documentation
41- </ Link >
42- </ nav >
43-
44- { /* Right: Buttons */ }
45- < div className = "flex items-center gap-3 justify-self-end" >
46- < Button variant = "outline" size = "sm" asChild >
47- < a
48- href = "https://github.com/your-repo"
49- target = "_blank"
50- rel = "noopener noreferrer"
51- className = "flex items-center gap-2"
52- >
53- < Github className = "h-4 w-4" />
54- < span className = "hidden sm:inline" > GitHub</ span >
27+ { ! minimal && (
28+ < nav className = "hidden md:flex justify-self-center items-center gap-6 min-w-0" >
29+ < a href = "#features" className = "text-muted-foreground hover:text-foreground transition-colors" >
30+ Features
31+ </ a >
32+ < a href = "#download" className = "text-muted-foreground hover:text-foreground transition-colors" >
33+ Download
5534 </ a >
56- </ Button >
57- < Button variant = "outline" size = "sm" asChild >
5835 < a
59- href = "https://arxiv.org/abs/your-paper-id"
36+ href = "https://github.com/your-repo"
37+ className = "text-muted-foreground hover:text-foreground transition-colors"
6038 target = "_blank"
6139 rel = "noopener noreferrer"
62- className = "flex items-center gap-2"
6340 >
64- < ExternalLink className = "h-4 w-4" />
65- < span className = "hidden sm:inline" > Paper</ span >
41+ GitHub
6642 </ a >
67- </ Button >
68- < Button size = "sm" asChild >
69- < a href = "#download" className = "flex items-center gap-2" >
70- < Download className = "h-4 w-4" />
71- < span className = "hidden sm:inline" > Download</ span >
43+ < a href = "#about" className = "text-muted-foreground hover:text-foreground transition-colors" >
44+ About
7245 </ a >
73- </ Button >
74- </ div >
46+ < Link to = "/docs" className = "text-muted-foreground hover:text-foreground transition-colors" >
47+ Documentation
48+ </ Link >
49+ </ nav >
50+ ) }
51+
52+ { /* Right: Buttons */ }
53+ { ! minimal && (
54+ < div className = "flex items-center gap-3 justify-self-end" >
55+ < Button variant = "outline" size = "sm" asChild >
56+ < a
57+ href = "https://github.com/your-repo"
58+ target = "_blank"
59+ rel = "noopener noreferrer"
60+ className = "flex items-center gap-2"
61+ >
62+ < Github className = "h-4 w-4" />
63+ < span className = "hidden sm:inline" > GitHub</ span >
64+ </ a >
65+ </ Button >
66+ < Button variant = "outline" size = "sm" asChild >
67+ < a
68+ href = "https://arxiv.org/abs/your-paper-id"
69+ target = "_blank"
70+ rel = "noopener noreferrer"
71+ className = "flex items-center gap-2"
72+ >
73+ < ExternalLink className = "h-4 w-4" />
74+ < span className = "hidden sm:inline" > Paper</ span >
75+ </ a >
76+ </ Button >
77+ < Button size = "sm" asChild >
78+ < a href = "#download" className = "flex items-center gap-2" >
79+ < Download className = "h-4 w-4" />
80+ < span className = "hidden sm:inline" > Download</ span >
81+ </ a >
82+ </ Button >
83+ </ div >
84+ ) }
7585 </ div >
7686 </ header >
7787 ) ;
0 commit comments