feat(pages): a hero section can carry the sign-up form beside its text

A HERO block may name an event. services-counter checks it belongs to the
page's company; mobile-api serves and accepts the form for it like a FORM
block; the portal shows the form in a card beside the hero text (below it on
phones), with the hero's own event picker, "No form" by default.

OpenSpec change: add-hero-signup-form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
This commit is contained in:
ngqileandClaude Opus 5.5 committed 2026-12-03 19:36:16 +08:00
1 parent 55ae666f01
commit 417af36227
20 files changed
+294 -22

No files matched your search

@@ -10,7 +10,7 @@ import java.util.List;
/**
* One landing-page block. Which fields apply depends on {@code type}:
* HERO (imageId, heading, text, button), RICH_TEXT (html), IMAGE_TEXT (imageId, imagePosition, heading, html, button),
* HERO (imageId, heading, text, button, optional eventUuid for a sign-up form beside the text), RICH_TEXT (html), IMAGE_TEXT (imageId, imagePosition, heading, html, button),
* FAQ (heading, items), FORM (heading, eventUuid), HTML (html), FEATURES (heading, text, cards), STEPS (heading, cards),
* TRUST (cards), CTA (heading, text, button). Any block may carry anchor and look.
*/
@@ -71,6 +71,10 @@ public final class CmsBlockValidator {
max(b.getHeading(), path + ".heading", 120);
max(b.getText(), path + ".text", 300);
button(b, path);
// add-hero-signup-form: an optional sign-up form beside the hero text, for an event of the page's company.
if (b.getEventUuid() != null && !ownEvent.test(b.getEventUuid())) {
throw refuse(path + ".eventUuid", "PagesBadEvent");
}
}
case "RICH_TEXT" -> html(b.getHtml(), path + ".html");
case "HTML" -> {