fix(layout): align /category main padding with /browse

Both routes render the same MessageStream; the layout wrapper used to inset
/category by px-4 / sm:px-6 on mobile while /browse stayed edge-to-edge,
shrinking bubble width and making the category waterfall feel narrower
than the all-resources page.
This commit is contained in:
TerryM
2026-06-03 14:30:20 +08:00
parent 985463b7da
commit fc19b92158
2 changed files with 43 additions and 1 deletions

View File

@@ -329,7 +329,14 @@ export function PublicLayout() {
});
}
};
const footerInContentFlow = stripLangPrefix(pathname) === "/browse";
// Routes that render a full-bleed asset stream and manage their own inner
// width / padding via `MessageStream`. Both 全部资料 (/browse) and the
// per-category view (/category/<slug>) reuse the same component, so they
// need the same zero outer padding here — otherwise the category page's
// bubbles render narrower than the all-resources page.
const strippedPath = stripLangPrefix(pathname);
const footerInContentFlow =
strippedPath === "/browse" || strippedPath.startsWith("/category/");
// Current page name shown in the header brand slot (falls back to the brand).
const pageTitle = usePageTitle();