Skip to content

Commit 31eb0a2

Browse files
Merge pull request #241 from nishtha-agarwal-211/fix/homepage-layout-alignment-238
Fix: Correct Homepage Layout Structure and Remove Duplicate Filters
2 parents b104bcd + f3814c9 commit 31eb0a2

2 files changed

Lines changed: 50 additions & 50 deletions

File tree

web-app/css/styles.css

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ body {
119119
/* Hero Section */
120120
.hero-section {
121121
position: relative;
122-
padding: 8rem 0;
122+
padding: 5rem 0;
123123
text-align: center;
124124
overflow: hidden;
125125
background: var(--bg-color);
@@ -166,7 +166,7 @@ body {
166166
.hero-content {
167167
position: relative;
168168
z-index: 1;
169-
max-width: 800px;
169+
max-width: 900px;
170170
margin: 0 auto;
171171
}
172172

@@ -192,23 +192,40 @@ body {
192192

193193
.hero-features {
194194
display: flex;
195-
gap: 1.5rem;
195+
gap: 1rem;
196196
justify-content: center;
197197
flex-wrap: wrap;
198-
margin-bottom: 3rem;
198+
margin-bottom: 2rem;
199199
animation: fadeInUp 0.7s ease 0.4s both;
200200
}
201201

202+
.hero-content .btn-random-project {
203+
animation: fadeInUp 0.7s ease 0.6s both;
204+
}
205+
202206
.feature-badge {
203207
display: flex;
204208
align-items: center;
205-
gap: 0.75rem;
209+
gap: 0.5rem;
206210
background: var(--surface-color);
207-
padding: 0.75rem 1.5rem;
211+
padding: 0.65rem 1.25rem;
208212
border-radius: 50px;
209213
border: 2px solid var(--primary-color);
210214
transition: var(--transition);
211-
cursor: default;
215+
cursor: pointer;
216+
font-size: inherit;
217+
font-family: inherit;
218+
color: inherit;
219+
}
220+
221+
.feature-badge.active {
222+
background: var(--primary-color);
223+
border-color: var(--primary-color);
224+
box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
225+
}
226+
227+
.feature-badge.active .feature-label {
228+
color: white;
212229
}
213230

214231
.feature-badge:hover {
@@ -218,7 +235,7 @@ body {
218235
}
219236

220237
.feature-icon {
221-
font-size: 1.5rem;
238+
font-size: 1.25rem;
222239
display: inline-block;
223240
}
224241

@@ -860,7 +877,7 @@ body {
860877
font-size: 1rem;
861878
font-weight: 600;
862879
transition: var(--transition);
863-
display: flex;
880+
display: inline-flex;
864881
align-items: center;
865882
gap: 0.5rem;
866883
white-space: nowrap;

web-app/index.html

Lines changed: 24 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -525,67 +525,50 @@ <h1>
525525
</nav>
526526

527527
<main id="main-content" tabindex="-1">
528-
529528
<!-- Hero Section -->
530529
<section class="hero-section" aria-label="Welcome">
531530
<div class="hero-background"></div>
532531
<div class="container">
533532
<div class="hero-content">
534533
<h2 class="hero-title">Learn Python the Fun Way!</h2>
535-
<p class="hero-subtitle">25+ Mini Projects • Beautiful UI • Beginner Friendly • Zero Dependencies
536-
</p>
534+
<p class="hero-subtitle">25+ Mini Projects • Beautiful UI • Beginner Friendly • Zero Dependencies</p>
537535

538-
<div class="hero-features">
539-
<div class="feature-badge" role="button" tabindex="0"
540-
onclick="document.querySelector('.tab[data-category=games]').click(); document.querySelector('.projects-section').scrollIntoView({behavior: 'smooth', block: 'start'});"
541-
style="cursor: pointer;">
536+
<div class="hero-features" role="tablist" aria-label="Project categories">
537+
<button class="feature-badge tab active" data-category="all"
538+
role="tab" aria-selected="true" tabindex="0">
539+
<span class="feature-icon">🌟</span>
540+
<span class="feature-label">All Projects</span>
541+
</button>
542+
<button class="feature-badge tab" data-category="games"
543+
role="tab" aria-selected="false" tabindex="-1">
542544
<span class="feature-icon">🎮</span>
543545
<span class="feature-label">Games</span>
544-
</div>
545-
<div class="feature-badge" role="button" tabindex="0"
546-
onclick="document.querySelector('.tab[data-category=math]').click(); document.querySelector('.projects-section').scrollIntoView({behavior: 'smooth', block: 'start'});"
547-
style="cursor: pointer;">
546+
</button>
547+
<button class="feature-badge tab" data-category="math"
548+
role="tab" aria-selected="false" tabindex="-1">
548549
<span class="feature-icon">🔢</span>
549550
<span class="feature-label">Math</span>
550-
</div>
551-
<div class="feature-badge" role="button" tabindex="0"
552-
onclick="document.querySelector('.tab[data-category=utilities]').click(); document.querySelector('.projects-section').scrollIntoView({behavior: 'smooth', block: 'start'});"
553-
style="cursor: pointer;">
551+
</button>
552+
<button class="feature-badge tab" data-category="utilities"
553+
role="tab" aria-selected="false" tabindex="-1">
554554
<span class="feature-icon">🔐</span>
555555
<span class="feature-label">Utilities</span>
556-
</div>
557-
</div>
558-
559-
<button class="btn-explore" id="exploreBtn" aria-label="Explore all projects">
560-
Explore Projects →
561-
</button>
562-
</div>
563-
</div>
564-
</section>
565-
566-
<!-- Search & Category Tabs -->
567-
<section class="tabs-section" aria-label="Search and Project categories">
568-
<div class="container">
569-
<div class="tabs-wrapper">
570-
<div class="tabs" role="tablist" aria-label="Project categories">
571-
<button class="tab active" data-category="all" role="tab" aria-selected="true" tabindex="0">🌟
572-
All Projects</button>
573-
<button class="tab" data-category="games" role="tab" aria-selected="false" tabindex="-1">🎮
574-
Games</button>
575-
<button class="tab" data-category="math" role="tab" aria-selected="false" tabindex="-1">🔢
576-
Math</button>
577-
<button class="tab" data-category="utilities" role="tab" aria-selected="false" tabindex="-1">🔐
578-
Utilities</button>
556+
</button>
579557
<!--
580558
PLAYGROUND TAB
581559
data-category="playground" is detected by main.js
582560
and delegates to window.playgroundAPI instead of
583561
running applyCategoryFilter().
584562
-->
585-
<button class="tab" data-category="playground" id="playgroundTab" role="tab"
586-
aria-selected="false" tabindex="-1">🐍 Playground</button>
563+
<button class="feature-badge tab" data-category="playground" id="playgroundTab"
564+
role="tab" aria-selected="false" tabindex="-1">
565+
<span class="feature-icon">🐍</span>
566+
<span class="feature-label">Playground</span>
567+
</button>
587568
</div>
588-
<button class="btn-random-project" id="randomProjectBtn" title="Discover a random project!">
569+
570+
<button class="btn-random-project" id="randomProjectBtn"
571+
title="Discover a random project!">
589572
<i class="fas fa-dice"></i> Random Project 🎲
590573
</button>
591574
</div>

0 commit comments

Comments
 (0)