Restructure hero: image at natural size overflowing, intro as text, no hard-coded copy
- views/partials/page-hero.php: removed the page-intro partial call. The intro is now rendered inline as a single .page-hero__intro div containing the editor-supplied intro text only (no hard-coded heading). The H1 is rendered with a dedicated .page-hero__heading class for typography control. Breadcrumbs + H1 + intro are in a single .page-hero__content container. - views/partials/page-intro.php: deleted (no longer used). - styles/blocks/page-hero.css: rewritten layout. The hero has a min-height of clamp(31rem, 38vw, 36rem). .page-hero__media is a foreground absolutely-positioned img on the right (no mask, no cover, no object-fit), with bottom: -10% so the image's bottom hangs over the bottom edge of the hero. The vector is positioned at bottom: clamp(1.5rem, 4vw, 3rem) with some spacing from the bottom edge, full-width on the left. Both elements stay above the content layer (z-index 10) and below the breadcrumb/title text. The H1 uses Quincy serif at clamp(2.5rem, 6vw, 4.5rem). The intro text is capped at 36rem to sit alongside the H1 without spanning the full hero width. - tests/inner-page.spec.js: removed the now-obsolete .page-hero__intro-heading / .page-hero__intro-text assertions (the intro is a single text block now). Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+44
-51
@@ -2,78 +2,71 @@
|
||||
* Scoped to .page-hero to avoid affecting the homepage-hero block. */
|
||||
|
||||
.page-hero {
|
||||
background:
|
||||
linear-gradient(83.68deg, #032F46 3.13%, #006196 45.91%, #8FC9E6 96.27%);
|
||||
background: linear-gradient(83.68deg, #032F46 3.13%, #006196 45.91%, #8FC9E6 96.27%);
|
||||
isolation: isolate;
|
||||
min-height: clamp(31rem, 38vw, 36rem);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.page-hero__media {
|
||||
inset: 0;
|
||||
-webkit-mask-image: linear-gradient(to left, transparent 0%, black 50%);
|
||||
mask-image: linear-gradient(to left, transparent 0%, black 50%);
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.page-hero__media img {
|
||||
display: block;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: right center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.page-hero__vector {
|
||||
bottom: 0;
|
||||
height: auto;
|
||||
left: 0;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.page-hero__content {
|
||||
padding-block: clamp(2rem, 6vw, 4rem);
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.page-hero__heading {
|
||||
color: var(--color-light, #fff);
|
||||
font-family: var(--font-quincy, 'Quincy', serif);
|
||||
font-weight: 400;
|
||||
font-size: clamp(2.5rem, 6vw, 4.5rem);
|
||||
line-height: 1.05;
|
||||
margin-block: clamp(1.5rem, 4vw, 3rem) 0;
|
||||
max-width: 36rem;
|
||||
}
|
||||
|
||||
.page-hero__intro {
|
||||
margin-top: clamp(2rem, 6vw, 4rem);
|
||||
color: var(--color-light, #fff);
|
||||
font-size: clamp(1rem, 1.5vw, 1.25rem);
|
||||
line-height: 1.5;
|
||||
max-width: 36rem;
|
||||
opacity: 0.95;
|
||||
}
|
||||
|
||||
.page-hero__intro-inner {
|
||||
display: grid;
|
||||
gap: clamp(1.5rem, 4vw, 3rem);
|
||||
grid-template-columns: 1fr;
|
||||
.page-hero__media {
|
||||
bottom: -10%;
|
||||
height: auto;
|
||||
max-height: none;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
right: clamp(1.5rem, 4vw, 4rem);
|
||||
width: clamp(18rem, 32vw, 28rem);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.page-hero__intro-inner {
|
||||
grid-template-columns: 1fr 2fr;
|
||||
}
|
||||
.page-hero__vector {
|
||||
bottom: clamp(1.5rem, 4vw, 3rem);
|
||||
height: auto;
|
||||
left: 0;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
width: clamp(28rem, 60vw, 56rem);
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.page-hero {
|
||||
min-height: clamp(28rem, 130vw, 40rem);
|
||||
}
|
||||
|
||||
.page-hero__media {
|
||||
-webkit-mask-image: linear-gradient(
|
||||
to bottom,
|
||||
rgb(0 0 0 / 0.9) 0%,
|
||||
rgb(0 0 0 / 0.45) 100%
|
||||
);
|
||||
mask-image: linear-gradient(
|
||||
to bottom,
|
||||
rgb(0 0 0 / 0.9) 0%,
|
||||
rgb(0 0 0 / 0.45) 100%
|
||||
);
|
||||
bottom: -8%;
|
||||
right: 0;
|
||||
width: 60vw;
|
||||
}
|
||||
|
||||
.page-hero__vector {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: auto;
|
||||
width: 100vw;
|
||||
bottom: clamp(1rem, 3vw, 2rem);
|
||||
width: 80vw;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user