style: format homepage files
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 34s

This commit is contained in:
TerryM
2026-05-31 02:56:34 +08:00
parent 39c593c454
commit 6b3211f26f
2 changed files with 156 additions and 147 deletions

View File

@@ -176,7 +176,10 @@ function PopularRankRow({
className="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[#191921] text-white outline-none transition hover:bg-[#22232D] focus-visible:ring-2 focus-visible:ring-ark-gold/70 disabled:cursor-wait" className="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[#191921] text-white outline-none transition hover:bg-[#22232D] focus-visible:ring-2 focus-visible:ring-ark-gold/70 disabled:cursor-wait"
> >
{isDownloading ? ( {isDownloading ? (
<LoaderCircle className="h-5 w-5 animate-spin" strokeWidth={2.3} /> <LoaderCircle
className="h-5 w-5 animate-spin"
strokeWidth={2.3}
/>
) : ( ) : (
<DownloadCloudIcon className="h-6 w-6" /> <DownloadCloudIcon className="h-6 w-6" />
)} )}

View File

@@ -224,7 +224,9 @@ export function Home() {
const lefts = children const lefts = children
.map((c) => c.getBoundingClientRect().left - rowLeft) .map((c) => c.getBoundingClientRect().left - rowLeft)
.filter((left) => left < padLeft - epsilon); .filter((left) => left < padLeft - epsilon);
delta = lefts.length ? lefts[lefts.length - 1] - padLeft : -row.scrollLeft; delta = lefts.length
? lefts[lefts.length - 1] - padLeft
: -row.scrollLeft;
} }
const maxScroll = Math.max(0, row.scrollWidth - row.clientWidth); const maxScroll = Math.max(0, row.scrollWidth - row.clientWidth);
const target = Math.max(0, Math.min(maxScroll, row.scrollLeft + delta)); const target = Math.max(0, Math.min(maxScroll, row.scrollLeft + delta));
@@ -385,7 +387,11 @@ export function Home() {
{rec.map((r, index) => ( {rec.map((r, index) => (
<div key={r.id}> <div key={r.id}>
<Reveal delay={Math.min(index, 8) * 0.05}> <Reveal delay={Math.min(index, 8) * 0.05}>
<RecommendedCard r={r} visualIndex={index} useFigmaDesign /> <RecommendedCard
r={r}
visualIndex={index}
useFigmaDesign
/>
</Reveal> </Reveal>
</div> </div>
))} ))}