Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/website-hero-overlap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'nostream-website': patch
---

Prevent the home hero headline from overlapping the hero film on wide viewports by slightly reducing headline and film scale and reserving space above the frame.
16 changes: 9 additions & 7 deletions website/site/src/components/home/Hero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import { VERSION } from '../../data/site'
.stage {
--pad-y: clamp(18px, 3.5vh, 44px);
--pad-x: clamp(14px, 3.5vw, 56px);
--film-h: calc(100svh - 68px - 2 * var(--pad-y) - 36px);
/* Headline band keeps the film from creeping under the h1 on wide layouts. */
--hero-headline-band: clamp(72px, 11vh, 96px);
--film-h: calc(100svh - 68px - 2 * var(--pad-y) - 36px - var(--hero-headline-band));

position: relative;
z-index: 0;
Expand All @@ -45,10 +47,10 @@ import { VERSION } from '../../data/site'
position: absolute;
z-index: 3;
left: var(--pad-x);
top: clamp(12px, 2.2vh, 26px);
max-width: min(560px, calc(100% - 2 * var(--pad-x)));
top: clamp(12px, 2.2vh, 22px);
max-width: min(520px, calc(100% - 2 * var(--pad-x)));
margin: 0;
font-size: clamp(24px, 3vw, 38px);
font-size: clamp(22px, 2.65vw, 34px);
line-height: 1.12;
letter-spacing: -0.02em;
pointer-events: none;
Expand Down Expand Up @@ -86,12 +88,12 @@ import { VERSION } from '../../data/site'
.stage :global(.hero-film) {
position: absolute;
z-index: 2;
top: 50%;
top: calc(50% + var(--hero-headline-band) * 0.22);
right: var(--pad-x);
transform: translateY(-50%);
width: min(1320px, 86vw, calc(var(--film-h) * 16 / 9));
width: min(1180px, 80vw, calc(var(--film-h) * 16 / 9));
max-width: calc(100% - 2 * var(--pad-x));
max-height: calc(var(--film-h) + 36px);
max-height: var(--film-h);
}

.stage :global(.hero-film .film-crisp.screen) {
Expand Down
Loading