From 320e09cc87e03da0f182ea645998cf195c514005 Mon Sep 17 00:00:00 2001 From: TerryM Date: Sun, 31 May 2026 02:04:26 +0800 Subject: [PATCH] fix: desktop homepage responsive polish and nav tweaks - Banner: scale down and center on desktop (md:max-w-[680px] lg:max-w-[800px]) so it no longer fills the whole screen. - Align section widths to one responsive container (820/1080/1180): wrap the Official row and match Popular to Latest, fixing left-edge/width mismatches. - RecommendedCard: stop the carousel card from shrinking back to 246.4px at xl. - Popular download button now matches the file bubble's filled round DownloadCloud button for visual consistency. - Header nav vertical padding py-1 -> py-0.5; swap Favorites before Popular across desktop nav and mobile menu to match the bottom tab order. - Official carousel: hide the left arrow at the start and the right arrow at the end instead of always showing both. All changes are md/lg/xl-scoped; mobile layout is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/components/FigmaBanner.tsx | 2 +- src/components/PopularRankList.tsx | 10 ++--- src/components/RecommendedCard.tsx | 2 +- src/layouts/PublicLayout.tsx | 32 ++++++++-------- src/pages/Home/index.tsx | 59 ++++++++++++++++-------------- 5 files changed, 55 insertions(+), 50 deletions(-) diff --git a/src/components/FigmaBanner.tsx b/src/components/FigmaBanner.tsx index bc044ba..f0925a1 100644 --- a/src/components/FigmaBanner.tsx +++ b/src/components/FigmaBanner.tsx @@ -301,7 +301,7 @@ export function FigmaBanner() { ) : null; return ( -
+
{isDownloading ? ( - + ) : ( - + )} ) : null} @@ -224,7 +224,7 @@ export function PopularRankList({ const placeholderCount = Math.max(0, MAX_ITEMS - items.length); return ( -
+
{items.map((post, index) => (
@@ -667,14 +667,6 @@ export function PublicLayout() { > {t("latest")} - setOpen(false)} - > - {t("popular")} - {t("favorites")} + setOpen(false)} + > + {t("popular")} +
) : null} diff --git a/src/pages/Home/index.tsx b/src/pages/Home/index.tsx index fc44514..97488cc 100644 --- a/src/pages/Home/index.tsx +++ b/src/pages/Home/index.tsx @@ -221,6 +221,9 @@ export function Home() { Math.round(recScroll.progress * (recommendedDotCount - 1)), ) : 0; + // Hide the arrow that points to an edge we're already at. + const recAtStart = recScroll.progress <= 0.01; + const recAtEnd = recScroll.progress >= 0.99; if (err) { return ( @@ -333,14 +336,15 @@ export function Home() {
-
- -
-
+
+
+ +
+
))}
- {canScrollRec ? ( - <> - - - + {canScrollRec && !recAtStart ? ( + ) : null} + {canScrollRec && !recAtEnd ? ( + + ) : null} +