Skip to content

Commit ea8c43d

Browse files
committed
projects.html: Add filters for searching projects
This commit adds filters for filtering the projects based on project work status, tags, difficulty level, initiatives and collaborating projects. Closes #559
1 parent c4fdb11 commit ea8c43d

4 files changed

Lines changed: 310 additions & 5 deletions

File tree

partials/tabs/forms.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ <h1 class="fine center">Open Source Forms</h1>
3535
</tr>
3636
</tbody>
3737
</table>
38-
<div class="apply-flex" ng-show="osforms.formsList.length === 0" style="padding: 5% 0;">
38+
<div class="apply-flex center-content" ng-show="osforms.formsList.length === 0" style="padding: 5% 0;">
3939
<h6>
4040
No forms have been uploaded, yet! If you are already a member of organization and a developer,
4141
you can share it with us on <a href="https://community.coala.io/">Community website</a>

partials/tabs/projects.html

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,39 @@
55
<br>
66
<div class="main-content container">
77
<div class="col m8 col offset-m2 s12">
8-
<div class="input-field searchbar">
9-
<input ng-model="searchText" placeholder="Search for a project" id="search" type="search" class="validate"> </div>
8+
<div class="filter-projects-inputs">
9+
<div class="input-field searchbar">
10+
<input ng-model="searchText" placeholder="Search for a project" id="search" type="search" class="validate"> </div>
11+
<div class="filter-btn apply-flex center-content">
12+
<a id="filters" class="waves-effect waves-light btn-large" ng-click="toggleFiltersDisplay()">
13+
<b>Filter Projects</b>
14+
</a>
15+
</div>
16+
</div>
17+
<div ng-class="{'display-none':!lc.displayFilters}" ng-click="toggleFiltersDisplay()">
18+
<i class="fa fa-times close-filters"></i>
19+
</div>
20+
<div class="all-filters-option apply-flex center-content fade-in" ng-class="{'display-none':!lc.displayFilters}">
21+
<h6><b>Filter Google Summer of Code Projects</b></h6>
22+
<div class="filters-inputs apply-flex">
23+
<div class="filter-select-fields apply-flex evenly-spread-content">
24+
<label class="project-filter" ng-repeat="(filter, metadata) in projectFilterOptions">
25+
<select class="{{ filter }}-selector" ng-model="metadata.model" ng-change="setModelList(filter, metadata.model)" name="{{ filter }}-selector" multiple>
26+
<option value="" disabled>{{ metadata.label }}</option>
27+
<option value="{{ value }}" ng-repeat="(key, value) in metadata.options">{{ key }}</option>
28+
</select>
29+
</label>
30+
</div>
31+
<div class="filter-btns">
32+
<a class="waves-effect waves-light btn" ng-click="applyFilters()">
33+
<i class="fa fa-check" aria-hidden="true"> Apply Filters</i>
34+
</a>
35+
<a class="waves-effect waves-light btn" ng-click="clearFilters()">
36+
<i class="fa fa-trash-o clear-filters"> Clear Filters</i>
37+
</a>
38+
</div>
39+
</div>
40+
</div>
1041
<div style="text-align: center;">
1142
For more project ideas, <a href="https://github.com/coala/projects/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22Project+Proposal%22">click here</a>.
1243
<br>
@@ -21,6 +52,9 @@
2152
<div class="row outline">
2253
<div class="parent-wrapper">
2354
<div class="parent">
55+
<div class="no-projects-found" ng-show="projectList.length === 0">
56+
{{ message.noProjectsFound }}
57+
</div>
2458
<div ng-repeat="project in projectList | filter: searchText | orderBy: sortOrder" class="card child">
2559
<div class="card-content waves-effect" ng-click="lc.showProject(project)">
2660
<div class="card-title center">{{ project.name }}</div>
@@ -97,6 +131,8 @@
97131
'slow');
98132
})
99133

134+
$('.filter-select-fields select').material_select();
135+
100136
$('.modal').modal({
101137
dismissible: true, // Modal can be dismissed by clicking outside of the modal
102138
opacity: 0.8, // Opacity of modal background

resources/css/style.css

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,42 @@
1+
.all-filters-option {
2+
position: relative;
3+
z-index: 1002;
4+
min-width: 350px;
5+
margin: 10px 0;
6+
background-color: white;
7+
box-shadow: 0 0 15px 2px black;
8+
border-radius: 20px;
9+
-webkit-animation-duration: 1s;
10+
animation-duration: 1s;
11+
-webkit-animation-fill-mode: both;
12+
animation-fill-mode: both;
13+
}
114
.apply-flex {
215
display: flex;
3-
justify-content: center;
16+
flex-flow: row wrap;
17+
align-items: center;
418
}
519
.black-shadow {
620
box-shadow: 0 0 15px 2px black;
721
}
822
.center-align-text {
923
text-align: center;
1024
}
25+
.center-content {
26+
justify-content: center;
27+
}
28+
.close-filters {
29+
right: 6%;
30+
margin-top: 1.25rem;
31+
position: absolute;
32+
z-index: 1003;
33+
}
34+
.display-none {
35+
display: none;
36+
}
37+
.evenly-spread-content {
38+
justify-content: space-evenly;
39+
}
1140
.hash_value_dup {
1241
position: 'absolute';
1342
left: '-9999px';
@@ -42,6 +71,36 @@
4271
.fa-clipboard:hover .hinttext {
4372
visibility: visible;
4473
}
74+
.filter-projects-inputs {
75+
display: flex;
76+
flex-flow: row wrap;
77+
justify-content: space-evenly;
78+
margin-top: 1rem;
79+
}
80+
.filter-btn {
81+
width: 165px;
82+
z-index: 0;
83+
}
84+
.filter-btn .btn-large {
85+
border-radius: 100px;
86+
box-shadow: 0 0 10px 1px darkslategray;
87+
}
88+
.filters-btns {
89+
width: 50%;
90+
}
91+
.filters-inputs {
92+
justify-content: space-around;
93+
padding: 20px 0;
94+
}
95+
.filter-select-fields {
96+
width: 100%;
97+
padding-top: 20px;
98+
padding-bottom: 10px;
99+
justify-content: space-around;
100+
}
101+
i.fa {
102+
cursor: pointer;
103+
}
45104
.project-detail-element > .clickable:hover, .clickable:hover .chip:hover {
46105
cursor: pointer;
47106
background-color: #f3f5f8;
@@ -124,6 +183,11 @@
124183
border: 0;
125184
z-index: 9;
126185
}
186+
.searchbar {
187+
width: 85%;
188+
min-width: 340px;
189+
margin-top: 0;
190+
}
127191
.sha256sum_hash {
128192
display: flex;
129193
justify-content: space-evenly;
@@ -136,3 +200,15 @@
136200
#sha256sum_hash_value {
137201
word-wrap: break-word;
138202
}
203+
@-webkit-keyframes fade-in {
204+
0% {opacity: 0;}
205+
100% {opacity: 1;}
206+
}
207+
@keyframes fade-in {
208+
0% {opacity: 0;}
209+
100% {opacity: 1;}
210+
}
211+
.fade-in {
212+
-webkit-animation-name: fade-in;
213+
animation-name: fade-in;
214+
}

0 commit comments

Comments
 (0)