From ed2bda5c02c6b5375c451e399b78f35be770ec78 Mon Sep 17 00:00:00 2001 From: Jeffrey Hales Date: Wed, 17 Jun 2026 14:21:28 -0700 Subject: [PATCH] feat(page-hero): add optional subtitle prop with mobile heading backdrop Extends PageHero with a subtitle?: string prop rendered as an h2 beneath the h1. On image-backed heroes the heading group gets a semi-transparent white backdrop (display: inline-block; background: #fffb) so the text stays readable against busy photography at mobile widths. Subtitle h2 inherits the page-hero heading font at a slightly smaller fluid size. --- www/src/components/PageHero.astro | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/www/src/components/PageHero.astro b/www/src/components/PageHero.astro index b245e2d..02ad056 100644 --- a/www/src/components/PageHero.astro +++ b/www/src/components/PageHero.astro @@ -1,33 +1,40 @@ --- interface Props { title: string; + subtitle?: string; image?: string; eyebrow?: string; constrain?: boolean; } -const { title, image, eyebrow, constrain = false } = Astro.props; +const { title, subtitle, image, eyebrow, constrain = false } = Astro.props; ---
+
{eyebrow - ?

{eyebrow}

{title}

- :

{title}

+ ?

{eyebrow}

{title}

{subtitle &&

{subtitle}

}
+ : <>

{title}

{subtitle &&

{subtitle}

} } +