-
-
Notifications
You must be signed in to change notification settings - Fork 77
/
site-header.tsx
62 lines (60 loc) · 2.14 KB
/
site-header.tsx
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import Link from "next/link";
import { siteConfig } from "@/app/site-config";
import { buttonVariants } from "@/components/ui/button";
import { Icons } from "@/components/icons";
import { MainNav } from "@/components/main-nav";
import { ThemeToggle } from "@/components/theme-toggle";
import { MobileDropdown } from "@/components/mobile-nav";
export function SiteHeader() {
return (
<header className="bg-background/90 sticky top-0 z-50 w-full border-b backdrop-blur">
<div className="container h-16 flex items-center justify-between">
<div className="flex items-center space-x-6">
<Link
href="/"
className="flex items-center space-x-2 rounded-md h-6 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring ring-offset-background"
>
<Icons.logo className="h-6 w-6" />
<span className="font-medium text-2xl leading-none">
{siteConfig.name}
</span>
</Link>
<MainNav items={siteConfig.mainNav} />
</div>
<div className="flex items-center space-x-2 md:space-x-4">
<Link
href={siteConfig.links.github}
target="_blank"
rel="noreferrer"
className={buttonVariants({
size: "icon",
variant: "ghost",
})}
>
<Icons.gitHub className="h-6 w-6" />
<span className="sr-only">GitHub</span>
</Link>
{/* <Link
href={siteConfig.links.twitter}
target="_blank"
rel="noreferrer"
>
<div
className={buttonVariants({
size: "icon",
variant: "ghost",
})}
>
<Icons.twitter className="h-6 w-6 fill-current" />
<span className="sr-only">Twitter</span>
</div>
</Link> */}
<ThemeToggle />
<MobileDropdown
items={{ main: siteConfig.mainNav, docs: siteConfig.sidebarNav }}
/>
</div>
</div>
</header>
);
}