Skip to content

Commit 2b1ca3d

Browse files
committed
.
1 parent 1a08faa commit 2b1ca3d

File tree

6 files changed

+353
-17
lines changed

6 files changed

+353
-17
lines changed

app/globals.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474
--chart-3: oklch(0.398 0.07 227.392);
7575
--chart-4: oklch(0.828 0.189 84.429);
7676
--chart-5: oklch(0.769 0.188 70.08);
77-
--sidebar: oklch(0.985 0 0);
78-
--sidebar-foreground: oklch(0.145 0 0);
77+
--sidebar: oklch(1 0 0);
78+
--sidebar-foreground: #0d0d0d;
7979
--sidebar-primary: oklch(0.205 0 0);
8080
--sidebar-primary-foreground: oklch(0.985 0 0);
8181
--sidebar-accent: oklch(0.97 0 0);
@@ -112,7 +112,7 @@
112112
--chart-3: oklch(0.769 0.188 70.08);
113113
--chart-4: oklch(0.627 0.265 303.9);
114114
--chart-5: oklch(0.645 0.246 16.439);
115-
--sidebar: oklch(0.205 0 0);
115+
--sidebar: #0d0d0d;
116116
--sidebar-foreground: oklch(0.985 0 0);
117117
--sidebar-primary: oklch(0.488 0.243 264.376);
118118
--sidebar-primary-foreground: oklch(0.985 0 0);
@@ -137,7 +137,7 @@
137137
body {
138138
@apply bg-background text-foreground;
139139
}
140-
a, span, Button, Link {
140+
a, span, Button, Link, CollapsibleTrigger {
141141
@apply transition delay-100 duration-200;
142142
}
143143
}

components/app-sidebar.tsx

Lines changed: 148 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,151 @@
1+
"use client"
2+
3+
14
import {
2-
Sidebar,
3-
SidebarContent,
4-
SidebarFooter,
5-
SidebarGroup,
6-
SidebarHeader,
5+
Sidebar,
6+
SidebarContent,
7+
SidebarFooter,
8+
SidebarGroup,
9+
SidebarHeader,
10+
SidebarMenu,
11+
SidebarMenuItem,
12+
SidebarMenuButton,
13+
SidebarMenuSubItem,
14+
SidebarMenuSub,
715
} from "@/components/ui/sidebar"
8-
16+
import { useSidebar } from "@/components/ui/sidebar"
17+
import {
18+
Collapsible,
19+
CollapsibleContent,
20+
CollapsibleTrigger,
21+
} from "@/components/ui/collapsible"
22+
import { ChevronDown } from "lucide-react"
23+
import Link from "next/link"
24+
import { Button } from "@/components/ui/button"
25+
26+
27+
import { FadeIn } from "@/components/animation/fade-in"
28+
29+
30+
931
export function AppSidebar() {
10-
return (
11-
<Sidebar>
12-
<SidebarContent />
13-
</Sidebar>
14-
)
15-
}
32+
const {
33+
state,
34+
open,
35+
setOpen,
36+
openMobile,
37+
setOpenMobile,
38+
isMobile,
39+
toggleSidebar,
40+
} = useSidebar()
41+
return (
42+
<FadeIn>
43+
<Sidebar>
44+
<SidebarMenu className="mt-24 px-8 text-sm">
45+
46+
47+
48+
<Collapsible defaultOpen className="group/collapsible flex flex-col gap-6">
49+
<SidebarMenuItem>
50+
<CollapsibleTrigger className="w-full flex flex-row justify-between items-center p-2 rounded-sm hover:bg-o-blue/3 select-none">
51+
Project
52+
<ChevronDown className="size-4 transition-transform group-data-[state=closed]/collapsible:rotate-270 group-data-[state=open]/collapsible:rotate-0" />
53+
</CollapsibleTrigger>
54+
<CollapsibleContent>
55+
<SidebarMenuSub>
56+
<Link href="/blog/agibot-world" className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
57+
AgiBot World
58+
</Link>
59+
<Link href="/vista" target="_blank" className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
60+
OpenDV
61+
</Link>
62+
<Link href="/drivelm" target="_blank" className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
63+
DriveLM
64+
</Link>
65+
<Link href="/dataset" className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
66+
more
67+
</Link>
68+
</SidebarMenuSub>
69+
</CollapsibleContent>
70+
</SidebarMenuItem>
71+
</Collapsible>
72+
73+
74+
75+
<Collapsible defaultOpen className="group/collapsible flex flex-col gap-6">
76+
<SidebarMenuItem>
77+
<CollapsibleTrigger className="w-full flex flex-row justify-between items-center p-2 rounded-sm hover:bg-o-blue/3 select-none">
78+
Publication
79+
<ChevronDown className="size-4 transition-transform group-data-[state=closed]/collapsible:rotate-270 group-data-[state=open]/collapsible:rotate-0" />
80+
</CollapsibleTrigger>
81+
<CollapsibleContent>
82+
<SidebarMenuSub>
83+
<Link href="https://github.com/OpenDriveLab/UniAD" className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
84+
UniAD
85+
</Link>
86+
<Link href="https://github.com/OpenDriveLab/UniVLA" target="_blank" className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
87+
UniVLA
88+
</Link>
89+
<Link href="https://www.computer.org/csdl/journal/tp/2025/03/10791908/22ABgP6PlUQ" target="_blank" className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
90+
BEVFormer
91+
</Link>
92+
<Link href="/publications" className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
93+
more
94+
</Link>
95+
</SidebarMenuSub>
96+
</CollapsibleContent>
97+
</SidebarMenuItem>
98+
</Collapsible>
99+
100+
101+
102+
<Collapsible defaultOpen className="group/collapsible flex flex-col gap-6">
103+
<SidebarMenuItem>
104+
<CollapsibleTrigger className="w-full flex flex-row justify-between items-center p-2 rounded-sm hover:bg-o-blue/3 select-none">
105+
Event
106+
<ChevronDown className="size-4 transition-transform group-data-[state=closed]/collapsible:rotate-270 group-data-[state=open]/collapsible:rotate-0" />
107+
</CollapsibleTrigger>
108+
<CollapsibleContent>
109+
<SidebarMenuSub>
110+
<Link href="/challenge2025" className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
111+
Challenge 2025
112+
</Link>
113+
<Link href="/cvpr2025" className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
114+
Events at CVPR 2025
115+
</Link>
116+
<Link href="https://sagroups.ieee.org/3474/" target="_blank" className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
117+
IEEE Standard P3474
118+
</Link>
119+
<Link href="/events" className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
120+
more
121+
</Link>
122+
</SidebarMenuSub>
123+
</CollapsibleContent>
124+
</SidebarMenuItem>
125+
</Collapsible>
126+
127+
128+
129+
<Link href="/team" className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
130+
Team
131+
</Link>
132+
133+
134+
135+
<Link href="/recruit" className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
136+
Recruit
137+
</Link>
138+
139+
140+
141+
<Link href="https://github.com/sponsors/OpenDriveLab" target="_blank" className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
142+
Sponsor
143+
</Link>
144+
145+
146+
147+
</SidebarMenu>
148+
</Sidebar>
149+
</FadeIn>
150+
)
151+
}

components/ui/collapsible.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
"use client"
2+
3+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
4+
5+
function Collapsible({
6+
...props
7+
}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {
8+
return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />
9+
}
10+
11+
function CollapsibleTrigger({
12+
...props
13+
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {
14+
return (
15+
<CollapsiblePrimitive.CollapsibleTrigger
16+
data-slot="collapsible-trigger"
17+
{...props}
18+
/>
19+
)
20+
}
21+
22+
function CollapsibleContent({
23+
...props
24+
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {
25+
return (
26+
<CollapsiblePrimitive.CollapsibleContent
27+
data-slot="collapsible-content"
28+
{...props}
29+
/>
30+
)
31+
}
32+
33+
export { Collapsible, CollapsibleTrigger, CollapsibleContent }

components/ui/sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ function SidebarMenuSub({ className, ...props }: React.ComponentProps<"ul">) {
643643
data-slot="sidebar-menu-sub"
644644
data-sidebar="menu-sub"
645645
className={cn(
646-
"border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
646+
"border-sidebar-border text-foreground/50 ml-2 flex min-w-0 translate-x-px flex-col gap-.5 border-l pl-2",
647647
"group-data-[collapsible=icon]:hidden",
648648
className
649649
)}

0 commit comments

Comments
 (0)