Skip to content

Commit 486fef4

Browse files
authored
Merge pull request #102 from Vishal-raj-1/project
adding search bar for project page, and dropdown list on archive page.
2 parents d87df08 + 7a61963 commit 486fef4

File tree

4 files changed

+88
-26
lines changed

4 files changed

+88
-26
lines changed

archive.html

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,9 @@
102102
<main class="mdl-layout__content">
103103
<div class="nwoc-content">
104104
<h3>Archive</h3>
105-
<ul>
106-
<li><a href="#2019">2019</a></li>
107-
<li><a href="#2018">2018</a></li>
108-
<li><a href="#2017">2017</a></li>
109-
<li><a href="#previous-sponsors">Previous Sponsors</a></li>
110-
</ul>
111-
112-
<a id="2019"></a>
113-
<h3>2019</h3>
114-
105+
<div class="archive">
106+
<details>
107+
<summary>2019</summary>
115108
<div class="mdl-grid mdl-grid--no-spacing">
116109
<div class="mdl-cell mdl-cell--6-col">
117110
<div class="nwoc-repo-card">
@@ -549,11 +542,10 @@ <h3>2019</h3>
549542
</div>
550543
</div>
551544
</div>
545+
</details>
552546

553-
554-
<a id="2018"></a>
555-
<h3>2018</h3>
556-
547+
<details>
548+
<summary>2018</summary>
557549
<div class="mdl-grid mdl-grid--no-spacing">
558550
<div class="mdl-cell mdl-cell--6-col">
559551
<div class="nwoc-repo-card">
@@ -1060,10 +1052,11 @@ <h3>2018</h3>
10601052
</div>
10611053
</div>
10621054
</div>
1063-
1064-
<a id="2017"></a>
1065-
<h3>2017</h3>
1055+
</details>
10661056

1057+
1058+
<details>
1059+
<summary>2017</summary>
10671060
<div class="mdl-grid mdl-grid--no-spacing">
10681061
<div class="mdl-cell mdl-cell--6-col">
10691062
<div class="nwoc-repo-card">
@@ -1304,14 +1297,17 @@ <h3>2017</h3>
13041297
</ul>
13051298
</div>
13061299
</div>
1307-
1300+
13081301
</div>
1302+
</details>
13091303

1310-
<a id="previous-sponsors"></a>
1311-
<h3>Previous Sponsors</h3>
1304+
<details>
1305+
<summary>Previous Sponsors</summary>
13121306
<a href="https://www.github.com/" target="_blank"><img class="nwoc-current-sponsors" src="/images/GitHub_Logo_custom.png"/></a>
13131307
<a href="https://www.jetbrains.com/" target="_blank"><img class="nwoc-current-sponsors" src="/images/jetbrains-variant-1.png"/></a>
13141308
<a href="https://www.digitalocean.com/" target="_blank"><img class="nwoc-current-sponsors" src="/images/DO_Logo_Vertical_Blue.png"/></a>
1309+
</details>
1310+
</div>
13151311
</div>
13161312
<footer>
13171313
<svg viewBox="0 0 120 28">
@@ -1415,4 +1411,4 @@ <h3>Previous Sponsors</h3>
14151411
}
14161412
</script>
14171413

1418-
</html>
1414+
</html>

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@
115115
<p>NWoC (NJACK Winter of Code) is a program by NJACK (The Official Computer Science Club of IIT Patna) that
116116
helps students understand the paradigm of Open Source contribution and gives them real world software
117117
development experience.
118-
<div id="demo-snackbar-example" class="mdl-js-snackbar mdl-snackbar">
118+
<!-- <div id="demo-snackbar-example" class="mdl-js-snackbar mdl-snackbar">
119119
<a href="https://docs.google.com/forms/d/e/1FAIpQLSdA1dAV8ywtVNenm26nfEXfp07jfLWDxcz8PkQF8hwZGTIHfg/viewform?usp=sf_link"
120120
target="_blank" class="mdl-snackbar__text" style="text-decoration: none;"></a>
121121
<button class="mdl-snackbar__action" type="button"></button>
122-
</div>
122+
</div> -->
123123
</p>
124124
</div>
125125
<div class="nwoc-header-sponsors">
@@ -502,7 +502,7 @@ <h4>Tell your friends about NWoC</h4>
502502
});
503503

504504
</script>
505-
<script>
505+
<!-- <script>
506506
(function () {
507507
'use strict';
508508
var snackbarContainer = document.querySelector('#demo-snackbar-example');
@@ -522,7 +522,7 @@ <h4>Tell your friends about NWoC</h4>
522522
});
523523
524524
}());
525-
</script>
525+
</script> -->
526526
<script>
527527
//Get the button
528528
var mybutton = document.getElementById("myBtn");

projects.html

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ <h3>NWoC 2020 Projects</h3>
107107

108108
<p style="text-align:justify">These are the selected projects for NWoC 2020. Please refer to the project Readme to get the Communication Channel Link of the project to be in touch with the mentor. Make sure to visit the <a href="https://github.com/NJACKWinterOfCode/Get-Started-NWoC20" target="_blank">Getting Started</a> repository to know the important rules and guidelines that you need to follow.</p>
109109

110+
<input type="search" name="searchBar" id="searchBar" onkeyup="mysearchFunction()" placeholder="Search for tags (like:html,css,web)">
111+
110112
<div class="mdl-grid mdl-grid--no-spacing">
111113
<div class="mdl-cell mdl-cell--6-col">
112114
<div class="nwoc-repo-card">
@@ -708,4 +710,23 @@ <h3>NWoC 2020 Projects</h3>
708710
document.documentElement.scrollTop = 0;
709711
}
710712
</script>
711-
</html>
713+
<script type="text/javascript">
714+
function mysearchFunction() {
715+
let input = document.getElementById('searchBar').value;
716+
input = input.toUpperCase();
717+
let repoCard = document.getElementsByClassName('nwoc-repo-card');
718+
let card = document.getElementsByClassName('mdl-cell--6-col');
719+
let list = document.getElementsByClassName('repo-stats');
720+
// console.log(card);
721+
for (let i = 0; i < list.length; i++) {
722+
if (list[i].innerHTML.toUpperCase().includes(input)) {
723+
repoCard[i].style.display = "";
724+
card[i].style.display = "";
725+
} else {
726+
repoCard[i].style.display = "none";
727+
card[i].style.display = "none";
728+
}
729+
}
730+
}
731+
</script>
732+
</html>

style.css

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,22 @@ a {
301301
margin-right: 30px;
302302
margin-bottom: 30px;
303303
}
304+
/* Search Bar */
305+
#searchBar{
306+
background-color: white;
307+
border: none;
308+
border: 2px solid #a6d2ff;
309+
display:block;
310+
width: 95%;
311+
margin: 20px auto;
312+
padding: 8px;
313+
font-size: 14px;
314+
outline: none;
315+
box-shadow: 6px 6px 3px #45889b;
316+
}
304317

305318
.nwoc-repo-card {
319+
display: block;
306320
margin-bottom: 10px;
307321
padding: 18px;
308322
max-width: 328px;
@@ -311,6 +325,13 @@ a {
311325
border-radius: 5px;
312326
position: relative;
313327
box-shadow: 5px 7px 8px rgb(65 159 159);
328+
transform: scale(.99);
329+
transition: all .2s ease-in-out;
330+
}
331+
332+
.nwoc-repo-card:hover{
333+
box-shadow: 8px 10px 12px rgb(65 159 159);
334+
transform: scale(1);
314335
}
315336

316337
.nwoc-repo-card .repo-title {
@@ -364,6 +385,30 @@ a {
364385
margin: 0 auto;
365386
}
366387

388+
/* Archive Page Start Her*/
389+
details summary::-webkit-details-marker {
390+
display:none;
391+
}
392+
393+
.archive summary{
394+
width: 30%;
395+
margin-bottom: 12px;
396+
padding: 8px;
397+
outline: none;
398+
cursor: pointer;
399+
font-size: 16px;
400+
background-color: #b9ebfa;
401+
box-shadow: 4px 3px 4px #a3cbf2;
402+
transform: scale(.98);
403+
transition: all .3s ease;
404+
}
405+
406+
.archive summary:hover{
407+
transform: scale(1.05);
408+
background-color: #9ee1f9;
409+
box-shadow: 5px 6px 8px #a3cbf2;
410+
}
411+
367412
/* Contact Page Start Here */
368413
.nwoc-contact {
369414
width: 160px;

0 commit comments

Comments
 (0)