Skip to content

Commit f6a091c

Browse files
authored
Merge pull request #139 from pranavpatil005/master
Improved UI of filter section, non-overlapping filters, bordered buttons, dropdowns, and toggle switch.
2 parents a087c84 + c7fd40e commit f6a091c

File tree

3 files changed

+301
-89
lines changed

3 files changed

+301
-89
lines changed

index.html

Lines changed: 65 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -43,49 +43,73 @@ <h1>Showcase Your Front-End Creations</h1>
4343
</div>
4444
</section>
4545

46-
<section class="container fade-in" id="browse">
47-
<div class="filters">
48-
<h2><i class="fas fa-filter"></i> Filter Projects</h2>
49-
<div class="filter-controls">
50-
<div class="filter-group search-group">
51-
<label for="search-input">Search:</label>
52-
<div class="search-container">
53-
<i class="fas fa-search search-icon"></i>
54-
<input type="text" id="search-input" placeholder="Search projects by title, description, or tags..." />
55-
<button class="clear-search" id="clear-search" style="display: none;"><i class="fas fa-times"></i></button>
56-
</div>
57-
</div>
58-
<div class="filter-group">
59-
<label for="sort-by">Sort by:</label>
60-
<select id="sort-by">
61-
<option value="popularity">Most Popular</option>
62-
<option value="newest">Newest First</option>
63-
<option value="difficulty">Difficulty</option>
64-
<option value="alphabetical">A-Z</option>
65-
</select>
66-
</div>
67-
<div class="filter-group">
68-
<label for="difficulty">Difficulty:</label>
69-
<select id="difficulty">
70-
<option value="all">All Levels</option>
71-
<option value="beginner">Beginner</option>
72-
<option value="intermediate">Intermediate</option>
73-
<option value="advanced">Advanced</option>
74-
</select>
75-
</div>
76-
<div class="filter-group">
77-
<input type="checkbox" id="has-demo" />
78-
<label for="has-demo">Has Open Issues</label>
79-
</div>
80-
<button class="btn-secondary" id="apply-filters">Apply Filters</button>
81-
<button class="btn-secondary" id="reset-filters">Reset</button>
82-
<div class="filter-group">
83-
<label>Filter by Tech Stack:</label>
84-
<div id="tag-filters" class="tag-filters"></div>
85-
</div>
46+
<section class="container fade-in" id="browse">
47+
<div class="filters">
48+
<h2><i class="fas fa-filter"></i> Filter Projects</h2>
49+
50+
<div class="filter-controls">
51+
52+
<!-- Search (full width row) -->
53+
<div class="filter-group search-group full-width">
54+
<label for="search-input">Search:</label>
55+
<div class="search-container">
56+
<i class="fas fa-search search-icon"></i>
57+
<input type="text" id="search-input" placeholder="Search projects by title, description, or tags..." />
58+
<button class="clear-search" id="clear-search" style="display: none;">
59+
<i class="fas fa-times"></i>
60+
</button>
8661
</div>
8762
</div>
88-
</section>
63+
64+
<!-- Sort By -->
65+
<div class="filter-group">
66+
<label for="sort-by">Sort by:</label>
67+
<select id="sort-by">
68+
<option value="popularity">Most Popular</option>
69+
<option value="newest">Newest First</option>
70+
<option value="difficulty">Difficulty</option>
71+
<option value="alphabetical">A-Z</option>
72+
</select>
73+
</div>
74+
75+
<!-- Difficulty -->
76+
<div class="filter-group">
77+
<label for="difficulty">Difficulty:</label>
78+
<select id="difficulty">
79+
<option value="all">All Levels</option>
80+
<option value="beginner">Beginner</option>
81+
<option value="intermediate">Intermediate</option>
82+
<option value="advanced">Advanced</option>
83+
</select>
84+
</div>
85+
86+
<!-- Has Open Issues -->
87+
<div class="filter-group checkbox-group">
88+
<label class="switch">
89+
<input type="checkbox" id="has-demo" />
90+
<span class="slider"></span>
91+
</label>
92+
<span class="switch-label">Has Open Issues</span>
93+
</div>
94+
95+
96+
97+
<!-- Buttons -->
98+
<div class="filter-buttons">
99+
<button class="btn-primary" id="apply-filters">Apply</button>
100+
<button class="btn-primary" id="reset-filters">Reset</button>
101+
</div>
102+
103+
<!-- Tech Stack -->
104+
<div class="filter-group full-width">
105+
<label>Filter by Tech Stack:</label>
106+
<div id="tag-filters" class="tag-filters"></div>
107+
</div>
108+
109+
</div>
110+
</div>
111+
</section>
112+
89113

90114
<section class="projects-section fade-in" id="projects">
91115
<div class="projects-container fade-in">

script.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,3 +638,16 @@ entries.forEach((entry, index) => {
638638
}
639639
});
640640

641+
642+
const reviewSwiper = new Swiper(".review-swiper", {
643+
loop: true,
644+
autoplay: {
645+
delay: 4000, // 4 seconds per slide
646+
disableOnInteraction: false, // keeps autoplay after manual swipe
647+
},
648+
navigation: {
649+
nextEl: ".swiper-button-next",
650+
prevEl: ".swiper-button-prev",
651+
},
652+
speed: 700, // smooth transition
653+
});

0 commit comments

Comments
 (0)