Skip to content

Commit cf93877

Browse files
committed
.
1 parent 86483aa commit cf93877

File tree

2 files changed

+37
-6
lines changed

2 files changed

+37
-6
lines changed

app/(default_site)/test/page.tsx

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ export const metadata: Metadata = {
66
};
77

88

9-
9+
import Image from 'next/image'
10+
import Link from "next/link"
1011
import {
1112
Carousel,
1213
CarouselContent,
1314
CarouselItem,
1415
CarouselNext,
1516
CarouselPrevious,
1617
} from "@/components/ui/carousel"
18+
import { AspectRatio } from "@/components/ui/aspect-ratio"
1719

1820

1921

@@ -138,14 +140,43 @@ export default function Home() {
138140
align: "start",
139141
loop: true,
140142
}}
141-
className="w-full h-full"
143+
className="w-full h-full px-6"
142144
>
143-
<CarouselContent className="w-full h-full bg-amber-600">
145+
<CarouselContent className="w-full h-svh">
144146
{landings.map((landing, index) => (
145-
<CarouselItem key={index}>
146-
{landing.title}
147+
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">
149+
150+
<div className="flex-1/2 w-full h-full flex flex-col justify-center select-none">
151+
<AspectRatio ratio={16/9}>
152+
<Image
153+
src={landing.image}
154+
alt={landing.title}
155+
fill
156+
className="rounded-sm object-cover bg-gradient-landing"
157+
/>
158+
</AspectRatio>
159+
</div>
160+
161+
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">
164+
{index + 1} / {landings.length}
165+
</div>
166+
<div className="flex flex-col gap-10">
167+
<h1 className="text-t1 font-bold">
168+
{landing.title}
169+
</h1>
170+
<h2>
171+
{landing.description}
172+
</h2>
173+
</div>
174+
</div>
175+
176+
147177

148178
</CarouselItem>
179+
149180
))}
150181
</CarouselContent>
151182
</Carousel>

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)