Skip to content

Commit f0ea163

Browse files
committed
.
1 parent e234591 commit f0ea163

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

app/(default)/(home)/landing.tsx

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function Landing() {
8585
align: "start",
8686
loop: true,
8787
}}
88-
className="w-full pl-6 pr-2 md:pr-0 relative" /* some magic padding */
88+
className="w-full pl-6 pr-2 md:pr-0" /* some magic padding */
8989
setApi={setApi}
9090
>
9191
<CarouselContent className="w-full">
@@ -110,7 +110,7 @@ export function Landing() {
110110

111111

112112

113-
<div className="flex flex-row text-o-gray text-sm lg:text-base">
113+
<div className="hidden md:flex flex-row text-o-gray text-sm lg:text-base">
114114
{index + 1} / {landings.length}
115115
</div>
116116

@@ -192,33 +192,39 @@ export function Landing() {
192192
}
193193
</div>
194194
</div>
195+
196+
197+
195198
</div>
196199

197-
200+
198201

199202
</CarouselItem>
200203
))}
201204
</CarouselContent>
205+
206+
202207

203-
{/* 自定义小圆点导航 (不使用CarouselDots组件) */}
204208
{landings.length > 1 && (
205-
<div className="absolute bottom-6 left-0 right-0 mx-auto z-10 flex justify-center items-center gap-3">
209+
<div className="z-10 flex md:justify-center gap-3 mt-6 md:-ml-6">
206210
{landings.map((_, index) => (
207211
<button
208212
key={index}
209213
type="button"
210214
className={`
211-
w-3 h-3 rounded-full transition-all duration-300 border border-white/30
215+
w-1.5 h-1.5 rounded-full transition-all duration-300
212216
${currentIndex === index
213-
? "bg-gradient-to-br from-o-light-blue via-o-blue to-o-light-blue scale-110"
214-
: "bg-gray-200/70 hover:bg-gray-300"}
217+
? "bg-o-blue scale-110"
218+
: "bg-gray-300/70 hover:bg-gray-300"}
215219
`}
216220
onClick={() => scrollTo(index)}
217-
aria-label={`转到第 ${index + 1} 个轮播图项目`}
218221
/>
219222
))}
220223
</div>
221224
)}
225+
226+
227+
222228
</Carousel>
223229
</div>
224230
)

0 commit comments

Comments
 (0)