feat(pages): a hero can run full width with points and a form card heading
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
This commit is contained in:
1 parent
dbb58e6e94
commit
b55b8d2d86
25 files changed
+575
-46
No files matched your search
@@ -0,0 +1,59 @@
|
||||
# Proposal
|
||||
|
||||
## Why
|
||||
|
||||
The INS Hotel technology page is being rebuilt in Co-Lite to match INS's standalone landing page (`~/Projects/ins-landing-page`). Since add-hero-signup-form, the form sits beside the hero text, but the hero still looks unlike the original in five ways:
|
||||
|
||||
- it is a rounded box inside the page width, with grey space around it, where the original runs edge to edge directly under the top bar;
|
||||
- its shade is near-black over the whole photo, where the original fades from dark on the left to a clear photo on the right;
|
||||
- its headline is small and pinned to the top, where the original's is large, serif and vertically centred;
|
||||
- it has no bullet points under the text;
|
||||
- the form card has no title or subtitle ("Get a free consultation" / "Tell us about your property…").
|
||||
|
||||
Marketing staff cannot fix any of these from the editor.
|
||||
|
||||
## What Changes
|
||||
|
||||
- A HERO block gains a **Full width** option (`fullWidth`). A full-width hero:
|
||||
- spans the whole window, with square corners and no page margin;
|
||||
- is taller, with a larger serif headline, vertically centred;
|
||||
- uses a lighter shade that runs from dark on the left to almost clear on the right.
|
||||
- Full-width heroes and Custom HTML blocks that sit next to each other join with no gap, so a Custom HTML top bar runs straight into the hero.
|
||||
- Custom HTML frames (found in the live check):
|
||||
- they may shrink to 20 px instead of 100 px, so a 68 px top bar leaves no blank band;
|
||||
- the page asks each frame for its height once it listens and when the frame loads, because the frame's first report could arrive before the page was ready, leaving it at 600 px.
|
||||
- A HERO block may carry up to 6 **points**, short title-only lines (`cards`, 80 characters each) shown as a bullet list under its text. The editor reuses the trust strip's item list.
|
||||
- A HERO with an event may carry a **form heading** (`formHeading`, 80 characters) and **form text** (`formText`, 200 characters), shown at the top of the form card. Both can be typed in place on the canvas.
|
||||
- The server validates the new fields:
|
||||
- `fullWidth` is a boolean;
|
||||
- the hero takes 0 to 6 points, each a non-empty title of at most 80 characters, with no icon or text;
|
||||
- the form heading and form text are refused on a hero without an event.
|
||||
- New editor labels in English and Chinese, with an SQL label file for real environments.
|
||||
|
||||
Not changing:
|
||||
- The heroes that exist today. Without the option they look as they do now.
|
||||
- The sign-up form's fields, the privacy notice and the consent box. They are shared with QR sign-up, and the notice and consent are required by the data-protection rules.
|
||||
- Field labels and the interests checkboxes.
|
||||
- The submit button colour, which follows the company's accent colour. For INS's gold button, set INS's accent colour in Companies; that is a setting, not code.
|
||||
- The red wave decoration at the bottom of the INS hero, which is left out.
|
||||
|
||||
## Capabilities
|
||||
|
||||
### New Capabilities
|
||||
|
||||
None.
|
||||
|
||||
### Modified Capabilities
|
||||
|
||||
- `landing-pages`: adds "Full-Width Hero", "Hero Points" and "Hero Form Heading".
|
||||
|
||||
## Impact
|
||||
|
||||
- services-counter: `CmsBlock` gains `fullWidth`, `formHeading` and `formText`. `CmsBlockValidator` lets a HERO carry `cards` as points and checks the new fields.
|
||||
- mobile-api: none. Public blocks pass through as maps.
|
||||
- Portal:
|
||||
- `CmsBlocks.tsx` renders the hero layout and the joins between full-width blocks;
|
||||
- `BlockFields.tsx` gets the Full width switch, the points list and the form heading and text;
|
||||
- `cmsPages.ts` gets the types;
|
||||
- new labels in `defaultMessages.ts` and `zh_CN.seed.json`.
|
||||
- Data: no schema change, because the blocks are JSON. The new labels need a SQL label file in this change folder for real environments.
|
||||
Reference in new issue
Block a user