feat: Smaller photo and title at the top of posts and events, so the article starts on the first screen
Back to our planProblem
In plain words: on a post or event with a photo, the photo fills almost the whole screen (80% of its height) and the title is very large, so a visitor sees no article text until they scroll. Make the photo band much shorter and the title smaller, so the title, the key facts and the start of the article all show on the first screen.
Summary of the owner's feedback (2026-11-02, Claude in Chrome side panel): on the article page, readers first see a huge image and huge text and then have to scroll, which seems less intuitive. He wants a smaller image area and smaller text, with less of the picture at the top. His direction covers the design-rule change below.
Today (checked in the code): src/platform/ui/PageHeader.tsx, ImageHeader (variant image): the photo area is min-h-[80vh], pulled under the site header with -mt-[var(--header-height)]; the h1 is text-3xl md:text-5xl lg:text-6xl; the facts (Author, Date Published, Source / Date, Time, Format) sit on the photo with MetaList · on-image. Used by src/app/(frontend)/posts/[slug]/page.tsx and src/app/(frontend)/events/[slug]/page.tsx through postHeaderProps and eventHeaderProps. The design rules ask for heroes of min-h-[60vh] to min-h-[80vh] (docs/guidelines/ui-ux-design.md "Hero Sections", and the patterns in docs/guidelines/frontend-patterns/heroes-and-images.md); those were written for the home page hero, not for an article.
Proposed fix
A starting point; the owner can tweak the numbers after seeing it live.
- Photo band: replace
min-h-[80vh]with a bounded height that still grows if the title needs more room:min-h-[clamp(16rem,42svh,28rem)](about 256 px on a small phone, at most 448 px on a big screen, the site header's 72 px included because the band slides under it).svhso a phone's address bar doesn't make it jump. - Title:
text-2xl sm:text-3xl lg:text-4xl, still bold,text-balance, the page's one h1. - Facts move under the photo, on the page background, as a byline row (
MetaList · inline, as the plain header already uses): small text is the hardest to read on a photo, and moving it shortens the band. The category badges and the title stay on the photo. - Breadcrumb and spacing: keep the breadcrumb directly under the byline row; check the
pt-8/pt-16/pt-32spacing in both page files so the gap between header and article is the same on posts and events. - Keep: the photo credit under the photo (
ImageCredit, #405),priorityloading, the photo's focal point (Payload'sfocalPointis on inmedia.ts; check whetherMediahonours it withobject-position, since a shorter band crops more, and use it if it doesn't). - Docs in the same PR:
docs/ui/component-set.md(PageHeader · image),docs/ui/elements-layout-navigation.md(H6, H7, H9), and the gallery (src/app/(frontend)/dev/gallery/HeadersGallery.tsx). Policy change: add todocs/guidelines/ui-ux-design.md"Hero Sections" andheroes-and-images.mdthat a post or event header is a short band (the range above), not a near-full-screen hero; the home page hero keeps its rule. The reviewer checks this stays within the owner's quote. PageHeader.test.tsxkeeps passing; add a test that the image header's facts render outside the photo area.- Fix everything you touch: if
Media'sfillwarning (#468, item 2) comes from this header's wrapper, fix it here and say so on #468.
Native first: plain Tailwind sizing on the existing component; nothing to add.
Acceptance criteria
- Not done: On a post and an event with a photo, at 1280×720 and 1920×1080, the title, the byline row and the first line of the article are visible without scrolling.
- Not done: At 320×568 and 430×932, the badges, the whole title and the byline row are visible without scrolling, and no text overflows or scrolls sideways.
- Not done: At 768 and 1024 the band is no taller than 28rem and the title wraps cleanly.
- Not done: Screenshots of both pages at the six widths (320, 430, 768, 1024, 1280, 1920), light and dark, are attached to the PR.
- Not done: A post or event without a photo looks as it does today.
- Not done: The photo credit still shows under the photo; axe passes on both pages.
- Not done: The guideline and
docs/uichanges are in the PR, and the PR calls out the guideline change as a policy change quoting the owner.
Area
frontend, styling, ux
Priority
high
Generated by Claude Code, opens in a new tab