From f32f468cf34f237508ee9c56bd8c6251ae3e918a Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sat, 2 May 2026 17:34:03 +0100 Subject: [PATCH] =?UTF-8?q?feat(hero):=20Phase=202=20=E2=80=94=20size=20pr?= =?UTF-8?q?esets,=20alignment,=20tighter=20default=20padding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Drop the orphan `pt-14` on the outer wrapper (was meant for transparent floating headers; site headers don't need it) - New `design.size` enum: compact | default | tall | viewport | none - default (new): py-24 sm:py-32 lg:py-40 — modern 2026 baseline (~30% less than the previous py-32 sm:py-48 lg:py-56) - compact: utility heroes - tall: the previous default — opt-in for splashy weight - viewport: min-h-screen with vertical centring for splash heroes - New `design.alignment` enum: center (default) | left - Threads through eyebrow/title/subtitle/CTAs/trust/announcement - 'left' is the prep work for Phase 3 split layouts - Backward compat: `no_padding: true` still works — maps to size: "none" when size is unset (legacy field marked deprecated in schema) - Capabilities registry: size-presets, alignment --- modules/blox/blox/hero/component.jsx | 49 +++++++++++++++++++++------- modules/blox/schemas/blocks.json | 4 ++- 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/modules/blox/blox/hero/component.jsx b/modules/blox/blox/hero/component.jsx index bf8eecad..47103ba0 100644 --- a/modules/blox/blox/hero/component.jsx +++ b/modules/blox/blox/hero/component.jsx @@ -87,12 +87,13 @@ function StarStrip({stars}) { ); } -function TrustStrip({trust}) { +function TrustStrip({trust, alignKey = "center"}) { if (!trust) return null; const {stars, text} = trust; if (!stars && !text) return null; + const justify = alignKey === "left" ? "justify-start" : "justify-center"; return ( -
+
{stars != null && } {text && }
@@ -108,13 +109,14 @@ const BADGE_COLORS = { rose: "bg-rose-100 text-rose-700 dark:bg-rose-900/40 dark:text-rose-300", }; -function AnnouncementPill({announcement}) { +function AnnouncementPill({announcement, alignKey = "center"}) { if (!announcement?.text) return null; const badge = announcement.badge; const badgeCls = badge && BADGE_COLORS[badge.color] ? BADGE_COLORS[badge.color] : BADGE_COLORS.primary; + const justify = alignKey === "left" ? "sm:justify-start" : "sm:justify-center"; return ( -