Skip to content

Commit 95a5345

Browse files
Merge pull request steam-bell-92#488 from nishtha-agarwal-211/fix/decorative-code-overlapping-474
fix: constrain decorative code snippets to hero section
2 parents d3d4969 + f7fb8c4 commit 95a5345

2 files changed

Lines changed: 33 additions & 56 deletions

File tree

web-app/css/styles.css

Lines changed: 31 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,14 @@ body {
232232
/* ═══════════════════════════════════════
233233
HERO SECTION
234234
═══════════════════════════════════════ */
235-
/* .hero-section {
235+
.hero-section {
236236
position: relative;
237-
padding: 9rem 0;
237+
padding: 7.5rem 0 3.5rem;
238238
min-height: 520px;
239239
text-align: center;
240240
overflow: hidden;
241241
background: var(--hero-green-nav-bg);
242-
} */
242+
}
243243

244244

245245
/* Canvas fills the full hero */
@@ -285,7 +285,7 @@ body {
285285
font-family: 'IBM Plex Mono', monospace;
286286
font-size: clamp(0.72rem, 1.2vw, 0.92rem);
287287
letter-spacing: 0.02em;
288-
opacity: 0.5;
288+
opacity: 0.18;
289289
text-shadow: 0 0 18px rgba(34, 197, 94, 0.18);
290290
white-space: nowrap;
291291
transform-origin: center;
@@ -300,14 +300,14 @@ body {
300300
.snippet-two {
301301
top: 25%;
302302
right: 10%;
303-
opacity: 0.5;
303+
opacity: 0.18;
304304
animation: codeFloatTwo 22s ease-in-out infinite;
305305
}
306306

307307
.snippet-three {
308308
top: 50%;
309309
left: 12%;
310-
opacity: 0.5;
310+
opacity: 0.22;
311311
animation: codeFloatThree 20s ease-in-out infinite;
312312
}
313313

@@ -326,20 +326,20 @@ body {
326326
.snippet-six {
327327
top: 20%;
328328
right: 25%;
329-
opacity: 0.42;
329+
opacity: 0.15;
330330
animation: codeFloatThree 26s ease-in-out infinite;
331331
}
332332

333333
.snippet-seven {
334334
top: 80%;
335335
right: 18%;
336-
opacity: 0.42;
336+
opacity: 0.15;
337337
animation: codeFloatTwo 28s ease-in-out infinite;
338338
}
339339

340340
[data-theme="light"] .code-snippet {
341341
color: color-mix(in srgb, var(--text-secondary) 70%, var(--accent-color));
342-
opacity: 0.5;
342+
opacity: 0.15;
343343
text-shadow: none;
344344
}
345345

@@ -1761,27 +1761,28 @@ body {
17611761
}
17621762

17631763
.hero-section {
1764-
padding: 5rem 0;
1764+
padding: 7rem 0;
1765+
min-height: 400px;
17651766
}
17661767

17671768
.hero-title {
1768-
font-size: 2.6rem;
1769+
font-size: 2.3rem;
17691770
margin-bottom: 1rem;
17701771
}
17711772

17721773
.hero-subtitle {
17731774
font-size: 1rem;
1774-
margin-bottom: 1rem;
1775+
margin-bottom: 2rem;
17751776
}
17761777

17771778
.hero-features {
1778-
gap: 0.9rem;
1779-
margin-bottom: 1rem;
1779+
gap: 1rem;
1780+
margin-bottom: 2rem;
17801781
}
17811782

17821783
.feature-badge {
1783-
padding: 0.15rem 0 0.35rem;
1784-
font-size: 0.8rem;
1784+
padding: 0.6rem 1.2rem;
1785+
font-size: 0.95rem;
17851786
}
17861787

17871788
.feature-icon {
@@ -1793,10 +1794,6 @@ body {
17931794
font-size: 1rem;
17941795
}
17951796

1796-
.hero-subtitle {
1797-
font-size: 1.05rem;
1798-
}
1799-
18001797
.hero-badges {
18011798
gap: 0.6rem;
18021799
}
@@ -1807,7 +1804,7 @@ body {
18071804
}
18081805

18091806
.tabs-section {
1810-
padding: 2rem 0 1.5rem 0;
1807+
padding: 2rem 0 1.5rem;
18111808
}
18121809

18131810
.tabs-section .container {
@@ -1837,28 +1834,33 @@ body {
18371834
}
18381835

18391836
.btn-random-project {
1840-
width: auto;
1841-
justify-content: flex-start;
1842-
padding: 0.25rem 0;
1843-
font-size: 0.84rem;
1837+
width: 100%;
1838+
justify-content: center;
1839+
padding: 0.75rem 1.25rem;
1840+
font-size: 0.95rem;
18441841
}
18451842

18461843
.projects-section {
18471844
padding: 2.5rem 0;
18481845
}
18491846

18501847
.projects-grid {
1851-
grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
1852-
gap: 0.85rem;
1848+
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
1849+
gap: 1.5rem;
18531850
margin-top: 1.5rem;
18541851
}
18551852

18561853
.project-card {
1857-
padding: 0.95rem 1rem;
1854+
padding: 1.75rem 1.5rem;
1855+
}
1856+
1857+
.card-icon {
1858+
font-size: 3.25rem;
1859+
margin-bottom: 0.85rem;
18581860
}
18591861

18601862
.project-card h3 {
1861-
font-size: 0.98rem;
1863+
font-size: 1.15rem;
18621864
}
18631865

18641866
.search-wrapper {
@@ -2368,34 +2370,7 @@ body {
23682370
.footer-brand { flex: 1 1 100%; max-width: 600px; }
23692371
}
23702372

2371-
@media (max-width: 768px) {
2372-
.hero-section { padding: 7rem 0; min-height: 400px; }
2373-
.hero-title { font-size: 2.3rem; }
2374-
.hero-subtitle { font-size: 1rem; margin-bottom: 2rem; }
2375-
.hero-features { gap: 1rem; margin-bottom: 2rem; }
2376-
.feature-badge { padding: 0.6rem 1.2rem; font-size: 0.95rem; }
2377-
2378-
.tabs-section { padding: 2rem 0 1.5rem; }
2379-
.tabs-section .container { gap: 1.5rem; }
2380-
.tabs-wrapper { flex-direction: column; gap: 1rem; align-items: stretch; }
2381-
.tabs-wrapper .tabs { min-width: unset; width: 100%; }
2382-
.tabs { gap: 0.6rem; margin-top: 0; justify-content: flex-start; }
2383-
.tab { padding: 0.6rem 1.1rem; font-size: 0.9rem; }
2384-
2385-
.btn-random-project { width: 100%; justify-content: center; padding: 0.75rem 1.25rem; font-size: 0.95rem; }
23862373

2387-
.projects-section { padding: 2.5rem 0; }
2388-
.projects-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
2389-
.project-card { padding: 1.75rem 1.5rem; }
2390-
.card-icon { font-size: 3.25rem; margin-bottom: 0.85rem; }
2391-
.project-card h3 { font-size: 1.15rem; }
2392-
2393-
.search-wrapper { height: 50px; padding: 0 1.1rem; }
2394-
.search-input { font-size: 0.95rem; }
2395-
.search-shortcut { display: none; }
2396-
2397-
.modal-content { padding: 1.5rem; border-radius: 16px; }
2398-
}
23992374

24002375
@media (max-width: 576px) {
24012376
.footer-content { grid-template-columns: 1fr; text-align: center; gap: 2rem; }

web-app/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,7 @@
840840
</div>
841841

842842
<main id="main-content" tabindex="-1">
843+
<section class="hero-section">
843844
<div class="hero-background color-bends-container" aria-hidden="true"></div>
844845
<div class="hero-code-snippets" aria-hidden="true">
845846
<span class="code-snippet snippet-one">score += 1</span>
@@ -884,6 +885,7 @@ <h1 class="hero-title">Learn Python the Fun Way!</h1>
884885
<button class="btn-random-project" id="randomProjectBtn" title="Discover a random project!">launch random →</button>
885886
</div>
886887
</div>
888+
</section>
887889

888890
<section class="projects-section" aria-label="Projects">
889891
<div class="container">

0 commit comments

Comments
 (0)