A full-width hero spans the window with a larger serif headline and a lighter left-to-right shade. It may list up to 6 points and give its form card a heading and text. Full-width neighbours join with no gap. Custom HTML frames now shrink to 20 px and re-report their height when the page asks, so a short top bar no longer leaves a blank band. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
26 lines
2.6 KiB
Markdown
26 lines
2.6 KiB
Markdown
# Design
|
|
|
|
## Context
|
|
|
|
The HERO block renders inside `Section`, which wraps every non-HTML block in the page width (`max-w-5xl px-4`). The page's block list is `space-y-10`. Custom HTML blocks already render outside `Section`, so they run full width. The hero-with-form layout comes from add-hero-signup-form.
|
|
|
|
## Approaches
|
|
|
|
1. **A `fullWidth` option on HERO (chosen).** Explicit and opt-in, so existing heroes and templates do not change. It costs one boolean and one switch in the editor.
|
|
2. **Make every hero with a form full width.** This needs no new field, but it silently changes existing pages and ties two unrelated choices together.
|
|
3. **Build the hero in Custom HTML.** This cannot work: a sealed frame cannot hold the real sign-up form (see add-hero-signup-form).
|
|
|
|
## Decisions
|
|
|
|
- **Points reuse `cards`.** They use title-only cards, as the trust strip does. The DTO does not change, and the editor reuses the trust strip's item list (`PagesItemN`, `PagesAddItem`). On a HERO the validator allows 0 to 6 cards. FEATURES, STEPS and TRUST keep their 2 to 6 rule.
|
|
- **Joins.** A block counts as "bleed" when it is HTML, or when it is a full-width HERO. When a block and the block before it are both bleed, the block gets no top margin. Two Custom HTML blocks next to each other therefore join as well. That changes current pages, but only toward what Custom HTML sections expect: built sections are designed to stack.
|
|
- **A full-width hero is not wrapped in `Section`.** It renders outside the page width, in the same way as `HtmlSpot`. Its inner content uses a wider container (`max-w-6xl px-4`).
|
|
- **Font.** The headline uses Tailwind's `font-serif`, the system serif. No web font is added, so there is no new dependency and no third-party request.
|
|
- **Shade.** The full-width shade is a left-to-right gradient, from `black/75` through `black/45` to `black/10`. It stays black-based, because the design-token test refuses raw colours, and the white text sits on the dark side. On phones the layout stacks and the form card is solid, so contrast holds.
|
|
- **Form heading and text.** These are plain text fields edited with `Text` in place, in the same way as the hero heading. They are refused on a hero without an event, so they cannot hide in saved data.
|
|
|
|
## Risks
|
|
|
|
- **Contrast with a light photo on the right.** The text sits on the left, over the darkest part of the shade, and the right side holds the solid form card. This is acceptable.
|
|
- **Editor controls on the edge.** On the full-width canvas, the image button and the toolbar sit at the window's edge. They are already positioned inside the section by the PR #66 fix.
|