Landing pages gain a Top bar section (the company logo and an optional button, kept at the top of the window, first section only), a short label above the headings of five section types, and serif section headings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
2.8 KiB
2.8 KiB
Design
Context
The company header and the page title are drawn by LandingPage, and "hide page header" (hideHeader) removes both. Page settings are database columns threaded through services-counter, mobile-api and the portal. Blocks are JSON validated by CmsBlockValidator, so a new block or block field needs no schema change.
Approaches
- A Top bar block, used with "hide page header" (chosen). It is JSON only: no migration, and no changes to the page records in three services. The INS page already uses "hide page header" with a Custom HTML top bar, so this is a native swap for the same layout.
- New page settings ("hide title", header button label and link, heading font). This is the natural model, but it means four new columns and changes to every page DTO, the draft record, the admin and public APIs, and the settings panel. That is about ten times the work for the same result.
- Keep the top bar in Custom HTML. This is what the original page does; the native page exists to avoid it.
Decisions
- The top bar is the first block only. The server refuses it anywhere else (
PagesTopBarFirst), because a sticky bar in the middle of a page would cover the content as the visitor scrolls past it. The bar issticky top-0with a card background and a bottom border. It runs full width (it counts as bleed), so it joins a full-width hero below it with no gap. - Top bar fields. Only
buttonLabelandbuttonUrl(the pair rule, at most 40 characters, a safe link) plus the usualanchor. A heading, text, image, cards or look are refused (PagesUnusedField). The logo comes from the company's branding, as the default header's does. - The label (
eyebrow). At most 40 characters, allowed on FEATURES, STEPS, IMAGE_TEXT, FAQ and CTA, and refused on other types. It renders as apabove the h2, not as part of the heading, so screen readers read the heading on its own. It can be edited in place on the canvas. - Label colour. On the DARK band it uses
text-primary, the accent colour. On light backgrounds the accent can be too pale (INS gold on white is about 2:1), so it uses the accent mixed with the foreground colour,color-mix(in srgb, var(--primary) 60%, var(--foreground)). On the ACCENT band it uses the band's own text colour. - Serif headings. Section h2s get
font-serif, Tailwind's system serif, as the full-width hero does. No web font is added. This changes every landing page, CV's included. It is a small change, and it matches the hero.
Risks
- CV pages change font. CV's section headings become serif. If CV wants sans-serif, a later change can make the font a company setting.
- Sticky bar and same-page links. A
#namejump lands with the heading under the bar.scroll-margin-topon the named blocks keeps them clear when a top bar exists.