Compare commits

..
Author SHA1 Message Date
ngqileandClaude Opus 5.5 1d71b9122c fix(pages): end the page at a closing footer, with no blank strip below
The page's main area kept its bottom padding after a footer block,
leaving a light strip under the dark footer. A page whose last block
is a footer now has no bottom padding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
2026-12-04 14:02:00 +08:00
ngqile de8ff61fe0 Merge pull request 'docs: archive add-hero-fits-screen' (#83) from archive-hero-fits-screen into main
CI / build-and-publish (push) Failing after 0s
2026-12-04 04:45:20 +00:00
2 changed files with 11 additions and 1 deletions

No files matched your search

@@ -222,6 +222,15 @@ describe("LandingPage thank-you text and footer", () => {
expect(within(foot).getByText(/^© 2026/)).toHaveClass("border-t");
});
it("ends the page at the footer: no blank strip below a closing footer", () => {
const { unmount } = render(<LandingPage company={company} page={page([{ type: "FAQ", items: [{ question: "Q", answer: "A" }] }, footer])} />);
expect(screen.getByRole("main")).not.toHaveClass("pb-8");
expect(screen.getByRole("main")).not.toHaveClass("py-8");
unmount();
render(<LandingPage company={company} page={page([footer, { type: "FAQ", items: [{ question: "Q", answer: "A" }] }])} />);
expect(screen.getByRole("main").className).toMatch(/p[by]-8/);
});
it("keeps markup in footer text as text", () => {
render(<LandingPage company={company} page={page([{ type: "FOOTER", cards: [{ title: "Call", text: "<b>Call</b> +60 12-833 2775" }] }])} />);
const foot = screen.getByRole("contentinfo");
@@ -334,7 +334,8 @@ export function LandingPage({ company, page, banner, preview, frameBase, edit }:
)}
</div>
</header>}
<main className={page.hideHeader ? "pb-8" : "py-8"}>
{/* A closing footer is the page's end: no padding below it. */}
<main className={`${page.hideHeader ? "" : "pt-8"} ${page.blocks.at(-1)?.type === "FOOTER" ? "" : "pb-8"}`}>
<h1 className={page.hideHeader ? "sr-only" : `${WIDTH} mb-10 text-3xl font-semibold sm:text-4xl`}>{page.title}</h1>
<div>
{page.blocks.map((block, i) => (