Skip to content

Commit 8e31707

Browse files
committed
.
1 parent cf93877 commit 8e31707

File tree

3 files changed

+19
-231
lines changed

3 files changed

+19
-231
lines changed

app/(default_site)/layout.tsx

Lines changed: 0 additions & 206 deletions
Original file line numberDiff line numberDiff line change
@@ -124,212 +124,6 @@ export default function RootLayout({
124124

125125

126126

127-
<FadeIn>
128-
<footer className="w-full mb-20 flex flex-col gab-10">
129-
<div className="w-full pl-6 pr-6 flex flex-col items-center 3xl:hidden">
130-
<div className="w-full max-w-7xl mt-20 flex gap-10 items-center">
131-
<Link href="/" className="font-bold text-3xl select-none hover:text-mred">
132-
<Image
133-
src="/logo/HKU_MMLAB_text.png"
134-
alt="MMLab"
135-
width={192}
136-
height={192}
137-
/>
138-
</Link>
139-
</div>
140-
</div>
141-
{/* full width */}
142-
<div className="w-full pl-6 pr-6 flex justify-center 3xl:justify-evenly">
143-
<div className="w-48 hidden 3xl:block overflow-hidden">
144-
<div className="w-full mt-20 flex flex-col gap-3">
145-
<Link href="/" className="font-bold text-3xl select-none hover:text-mred">
146-
<Image
147-
src="/logo/HKU_MMLAB.png"
148-
alt="MMLab"
149-
width={64}
150-
height={64}
151-
/>
152-
</Link>
153-
</div>
154-
</div>
155-
<div className="w-full max-w-7xl mt-20 grid gap-10 grid-cols-2 lg:grid-cols-4">
156-
{footers.map((footer) => (
157-
<div key={footer.title} className="flex flex-col gap-3">
158-
<Link href={footer.href} className="font-bold text-xl mb-3 select-none hover:text-mred">
159-
{footer.title}
160-
</Link>
161-
{footer.links.map((f) => (
162-
<div key={f.subtitle}>
163-
<Link key={f.subtitle} href={f.href} target={f.target} className="hover:text-mred select-none">
164-
{f.subtitle}
165-
</Link>
166-
</div>
167-
))}
168-
</div>
169-
))}
170-
</div>
171-
<div className="w-48 hidden 3xl:block overflow-hidden">
172-
<div className="w-full mt-20 flex flex-row flex-wrap gap-10 select-none">
173-
174-
{/* to keep the same */}
175-
<HoverCard>
176-
<HoverCardTrigger className="select-none hover:text-mred hover:cursor-pointer h-8 w-8">
177-
<AspectRatio ratio={1/1}>
178-
<Image
179-
src='/icon/IDS.jpg'
180-
alt='HKU-Shanghai ICRC'
181-
fill
182-
/>
183-
</AspectRatio>
184-
</HoverCardTrigger>
185-
<HoverCardContent className="border-0 w-fit">
186-
<Link href="https://hku-sh-icrc.com/" target="_blank" className="select-none hover:text-mred">HKU-Shanghai ICRC</Link>
187-
</HoverCardContent>
188-
</HoverCard>
189-
<HoverCard>
190-
<HoverCardTrigger className="select-none hover:text-mred hover:cursor-pointer h-8 w-8">
191-
<AspectRatio ratio={1/1}>
192-
<Image
193-
src='/icon/jc_stem_lab.png'
194-
alt='JC STEM LAB'
195-
fill
196-
/>
197-
</AspectRatio>
198-
</HoverCardTrigger>
199-
<HoverCardContent className="border-0 w-fit">
200-
<span className="select-none hover:text-mred">JC STEM LAB</span>
201-
</HoverCardContent>
202-
</HoverCard>
203-
<Link href="https://opendrivelab.com/" target="_blank" className="h-8 w-8">
204-
<AspectRatio ratio={1/1}>
205-
<Image
206-
src='/icon/OpenDriveLab.svg'
207-
alt='OpenDriveLab'
208-
fill
209-
/>
210-
</AspectRatio>
211-
</Link>
212-
{/* <Link href="https://x.com/" target="_blank" className="select-none hover:text-mred">
213-
<svg className="size-8 text-inherit" aria-hidden="true" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
214-
<path d="M13.795 10.533 20.68 2h-3.073l-5.255 6.517L7.69 2H1l7.806 10.91L1.47 22h3.074l5.705-7.07L15.31 22H22l-8.205-11.467Zm-2.38 2.95L9.97 11.464 4.36 3.627h2.31l4.528 6.317 1.443 2.02 6.018 8.409h-2.31l-4.934-6.89Z"/>
215-
</svg>
216-
</Link> */}
217-
{/* <HoverCard>
218-
<HoverCardTrigger className="select-none hover:text-mred hover:cursor-pointer">
219-
<svg className="size-8 text-inherit" aria-hidden="true" width="24" height="24" fill="none" viewBox="0 0 24 24">
220-
<path stroke="currentColor" strokeLinecap="round" strokeWidth="2" d="m3.5 5.5 7.893 6.036a1 1 0 0 0 1.214 0L20.5 5.5M4 19h16a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1Z"/>
221-
</svg>
222-
</HoverCardTrigger>
223-
<HoverCardContent className="border-0 w-fit">
224-
<Link href="mailto:xxx@hku.hk" target="_blank" className="select-none hover:text-mred">xxx@hku.hk</Link>
225-
</HoverCardContent>
226-
</HoverCard> */}
227-
228-
</div>
229-
</div>
230-
</div>
231-
{/* --- */}
232-
<div className="w-full pl-6 pr-6 flex flex-col items-center 3xl:hidden">
233-
<div className="w-full max-w-7xl mt-20 flex gap-10 flex-wrap">
234-
235-
{/* to keep the same */}
236-
<HoverCard>
237-
<HoverCardTrigger className="select-none hover:text-mred hover:cursor-pointer h-8 w-8">
238-
<AspectRatio ratio={1/1}>
239-
<Image
240-
src='/icon/IDS.jpg'
241-
alt='HKU-Shanghai ICRC'
242-
fill
243-
/>
244-
</AspectRatio>
245-
</HoverCardTrigger>
246-
<HoverCardContent className="border-0 w-fit">
247-
<Link href="https://hku-sh-icrc.com/" target="_blank" className="select-none hover:text-mred">HKU-Shanghai ICRC</Link>
248-
</HoverCardContent>
249-
</HoverCard>
250-
<HoverCard>
251-
<HoverCardTrigger className="select-none hover:text-mred hover:cursor-pointer h-8 w-8">
252-
<AspectRatio ratio={1/1}>
253-
<Image
254-
src='/icon/jc_stem_lab.png'
255-
alt='JC STEM LAB'
256-
fill
257-
/>
258-
</AspectRatio>
259-
</HoverCardTrigger>
260-
<HoverCardContent className="border-0 w-fit">
261-
<span className="select-none hover:text-mred">JC STEM LAB</span>
262-
</HoverCardContent>
263-
</HoverCard>
264-
<Link href="https://opendrivelab.com/" target="_blank" className="h-8 w-8">
265-
<AspectRatio ratio={1/1}>
266-
<Image
267-
src='/icon/OpenDriveLab.svg'
268-
alt='OpenDriveLab'
269-
fill
270-
/>
271-
</AspectRatio>
272-
</Link>
273-
{/* <Link href="https://x.com/" target="_blank" className="select-none hover:text-mred">
274-
<svg className="size-8 text-inherit" aria-hidden="true" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
275-
<path d="M13.795 10.533 20.68 2h-3.073l-5.255 6.517L7.69 2H1l7.806 10.91L1.47 22h3.074l5.705-7.07L15.31 22H22l-8.205-11.467Zm-2.38 2.95L9.97 11.464 4.36 3.627h2.31l4.528 6.317 1.443 2.02 6.018 8.409h-2.31l-4.934-6.89Z"/>
276-
</svg>
277-
</Link> */}
278-
{/* <HoverCard>
279-
<HoverCardTrigger className="select-none hover:text-mred hover:cursor-pointer">
280-
<svg className="size-8 text-inherit" aria-hidden="true" width="24" height="24" fill="none" viewBox="0 0 24 24">
281-
<path stroke="currentColor" strokeLinecap="round" strokeWidth="2" d="m3.5 5.5 7.893 6.036a1 1 0 0 0 1.214 0L20.5 5.5M4 19h16a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1Z"/>
282-
</svg>
283-
</HoverCardTrigger>
284-
<HoverCardContent className="border-0 w-fit">
285-
<Link href="mailto:xxx@hku.hk" target="_blank" className="select-none hover:text-mred">xxx@hku.hk</Link>
286-
</HoverCardContent>
287-
</HoverCard> */}
288-
289-
</div>
290-
</div>
291-
<div className="w-full pl-6 pr-6 flex flex-row justify-center mt-20">
292-
<div className="max-w-7xl w-full flex flex-row justify-between">
293-
<div className="flex-1 flex flex-col justify-start">
294-
<span className="select-none">
295-
MMLab © 2001 - 2025
296-
</span>
297-
<span className="select-none">
298-
All Rights Reserved
299-
</span>
300-
<div>
301-
<Dialog>
302-
<DialogTrigger asChild>
303-
<span className="hover:text-mred cursor-pointer select-none">Site Credits</span>
304-
</DialogTrigger>
305-
<DialogContent className="sm:max-w-3xl p-6 border-0">
306-
<DialogHeader className="p-3 text-left">
307-
<DialogTitle>
308-
Site Credits
309-
</DialogTitle>
310-
<div className="w-full flex flex-col">
311-
<Separator className="mt-3"/>
312-
</div>
313-
<DialogDescription className="mt-3">
314-
<span>
315-
Thanks to the following site developers and all lab members for contributions.
316-
</span>
317-
<li className="mt-3 space-y-3 list-outside list-disc">
318-
<Link href="https://faikit.github.io/" target="_blank" className="animated-underline">Huijie Wang</Link>
319-
</li>
320-
</DialogDescription>
321-
</DialogHeader>
322-
</DialogContent>
323-
</Dialog>
324-
</div>
325-
</div>
326-
</div>
327-
</div>
328-
</footer>
329-
</FadeIn>
330-
331-
332-
333127
</main>
334128
);
335129
}

app/(default_site)/test/page.tsx

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ const landings: {
129129
export default function Home() {
130130

131131
return (
132-
<div className='w-full'>
132+
<div className="w-full">
133133

134134

135135

@@ -140,14 +140,14 @@ export default function Home() {
140140
align: "start",
141141
loop: true,
142142
}}
143-
className="w-full h-full px-6"
143+
className="w-full h-full px-6 max-w-3/4"
144144
>
145145
<CarouselContent className="w-full h-svh">
146146
{landings.map((landing, index) => (
147147

148-
<CarouselItem key={index} className="w-full h-full flex flex-col lg:flex-row gap-10 lg:gap-20 justify-center items-center px-20">
148+
<CarouselItem key={index} className="w-full h-full flex flex-col gap-10 justify-center items-center px-20 bg-amber-400 ">
149149

150-
<div className="flex-1/2 w-full h-full flex flex-col justify-center select-none">
150+
<div className="flex-1/3 max-w-1/3 h-full flex flex-col justify-center select-none">
151151
<AspectRatio ratio={16/9}>
152152
<Image
153153
src={landing.image}
@@ -159,17 +159,26 @@ export default function Home() {
159159
</div>
160160

161161

162-
<div className="flex-1/2 flex flex-col gap-10 justify-around select-none">
163-
<div className="flex flex-row justify-end font-bold">
162+
<div className="flex-1/2 max-w-1/2 flex flex-col gap-10 justify-around select-none overflow-hidden">
163+
<div className="flex flex-row justify-end font-bold overflow-hidden">
164164
{index + 1} / {landings.length}
165165
</div>
166-
<div className="flex flex-col gap-10">
167-
<h1 className="text-t1 font-bold">
166+
<div className="flex flex-col gap-10 w-full overflow-hidden">
167+
<h1 className="text-t1 font-bold w-full">
168168
{landing.title}
169169
</h1>
170-
<h2>
170+
<h2 className="w-full overflow-hidden">
171171
{landing.description}
172172
</h2>
173+
{/* <div className="max-w-2/3 overflow-hidden">
174+
<div className="max-w-2/3 flex flex-row gap-3 overflow-hidden">
175+
{landing.links.map((link, index) => (
176+
<Link key={index} href={link.url} target="_self" className="animated-underline">
177+
{link.link}
178+
</Link>
179+
))}
180+
</div>
181+
</div> */}
173182
</div>
174183
</div>
175184

@@ -184,21 +193,6 @@ export default function Home() {
184193

185194

186195

187-
<div className="w-full flex flex-row justify-center items-center">
188-
<div className='w-full md:w-3/4 h-full md:h-3/4 md:rounded-sm bg-gradient-landing flex flex-row justify-center items-center'>
189-
<div className="md:w-full max-w-3xl px-6 flex flex-col gap-6 select-none ">
190-
<h1 className="font-bold text-t1 text-white">
191-
404
192-
</h1>
193-
<h1 className="font-bold text-t1 text-white">
194-
Not Found
195-
</h1>
196-
</div>
197-
</div>
198-
</div>
199-
200-
201-
202196
</div>
203197
)
204198
}

components/ui/carousel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function CarouselContent({ className, ...props }: React.ComponentProps<"div">) {
144144
<div
145145
className={cn(
146146
"flex",
147-
// orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
147+
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
148148
className
149149
)}
150150
{...props}

0 commit comments

Comments
 (0)