67 lines
2.7 KiB
TypeScript
67 lines
2.7 KiB
TypeScript
import Link from "next/link"
|
|
import { BookOpen, Search, Bell, Settings } from "lucide-react"
|
|
import { Button } from "@/components/ui/button"
|
|
import { Input } from "@/components/ui/input"
|
|
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
|
|
|
|
export function SiteHeader() {
|
|
return (
|
|
<header className="sticky top-0 z-50 w-full border-b border-border/40 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
|
|
<div className="container mx-auto flex h-16 items-center px-4">
|
|
<div className="mr-8 flex items-center gap-2">
|
|
<div className="flex h-8 w-8 items-center justify-center rounded bg-primary text-primary-foreground">
|
|
<BookOpen className="h-5 w-5" />
|
|
</div>
|
|
<span className="text-xl font-serif font-bold tracking-tight">华夏谱 (HuaXiaPu)</span>
|
|
</div>
|
|
|
|
<nav className="hidden md:flex items-center gap-6 text-sm font-medium text-muted-foreground">
|
|
<Link
|
|
href="/"
|
|
className="transition-colors hover:text-foreground data-[active=true]:text-foreground data-[active=true]:font-semibold"
|
|
>
|
|
总览 (Overview)
|
|
</Link>
|
|
<Link href="/tree" className="transition-colors hover:text-foreground">
|
|
族谱 (Tree)
|
|
</Link>
|
|
<Link href="/members" className="transition-colors hover:text-foreground">
|
|
成员 (Members)
|
|
</Link>
|
|
<Link href="/timeline" className="transition-colors hover:text-foreground">
|
|
大事记 (Timeline)
|
|
</Link>
|
|
</nav>
|
|
|
|
<div className="ml-auto flex items-center gap-4">
|
|
<div className="relative hidden sm:block">
|
|
<Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />
|
|
<Input
|
|
type="search"
|
|
placeholder="搜索成员..."
|
|
className="h-9 w-64 rounded-full bg-muted pl-9 text-sm focus-visible:ring-primary"
|
|
/>
|
|
</div>
|
|
|
|
<Button variant="ghost" size="icon" className="text-muted-foreground">
|
|
<Bell className="h-5 w-5" />
|
|
<span className="sr-only">Notifications</span>
|
|
</Button>
|
|
|
|
<Link href="/settings">
|
|
<Button variant="ghost" size="icon" className="text-muted-foreground">
|
|
<Settings className="h-5 w-5" />
|
|
<span className="sr-only">Settings</span>
|
|
</Button>
|
|
</Link>
|
|
|
|
<Avatar className="h-8 w-8 border border-border">
|
|
<AvatarImage src="/placeholder-user.jpg" alt="User" />
|
|
<AvatarFallback>李</AvatarFallback>
|
|
</Avatar>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
)
|
|
}
|