Skip to content

Commit 4e064d7

Browse files
committed
Constrain hero section to page width on large screens
Wrap hero grid content in .hero-inner (max-width: 1200px, margin: 0 auto) so the content aligns with the rest of the page on wide viewports. The background gradient/overlay stays full-width via the outer .hero element.
1 parent 6a07d2c commit 4e064d7

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

Website/src/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848

4949
<header class="hero">
5050
<div class="hero-bg" data-parallax="0.3"></div>
51+
<div class="hero-inner">
5152
<div class="hero-content">
5253
<div class="hero-badge">A New Programming Language</div>
5354
<h1 class="hero-title">
@@ -124,6 +125,7 @@ <h1 class="hero-title">
124125
</svg>
125126
<p class="diagram-caption">Write plugins in <em>any language</em>. Compile to a <strong>standalone binary</strong>.</p>
126127
</div>
128+
</div><!-- /.hero-inner -->
127129
</header>
128130

129131
<section class="streaming-section">

Website/src/style.css

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,13 +324,21 @@ body.menu-open {
324324

325325
.hero {
326326
min-height: 100vh;
327+
position: relative;
328+
overflow: hidden;
329+
padding: 140px var(--space-xl) 100px;
330+
}
331+
332+
.hero-inner {
333+
max-width: 1200px;
334+
margin: 0 auto;
335+
width: 100%;
327336
display: grid;
328337
grid-template-columns: 1fr 1fr;
329338
gap: var(--space-xl);
330339
align-items: center;
331-
padding: 140px var(--space-xl) 100px;
332340
position: relative;
333-
overflow: hidden;
341+
z-index: 1;
334342
}
335343

336344
/* Animated gradient background */
@@ -1527,9 +1535,12 @@ section {
15271535
}
15281536

15291537
.hero {
1538+
padding: 120px var(--space-lg) 80px;
1539+
}
1540+
1541+
.hero-inner {
15301542
grid-template-columns: 1fr;
15311543
gap: var(--space-xl);
1532-
padding: 120px var(--space-lg) 80px;
15331544
}
15341545

15351546
.hero-code {

0 commit comments

Comments
 (0)