forked from fineanmol/Hacktoberfest2024
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
380 lines (320 loc) · 16.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<link rel="icon" href="https://hacktoberfestswaglist.com/img/hacktoberfest-favicon.ico" type="image/x-icon">
<!--Stats Script-->
<!-- <script src="scripts/stats.js"></script> -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Expires" content="0">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<meta name="description"
content="This is a static website serving as a beginner friendly project to help developers get started with hacktoberfest -Gateway to open source.">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<!-- Font Style from google fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Special+Elite&display=swap" rel="stylesheet">
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
crossorigin="anonymous"></script>
<!-- Github follow button -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
<script src="./contributors/contributorsList.js"></script>
<link rel="stylesheet" href="./css/contributors.css">
<link rel="stylesheet" href="./css/navbar.css">
<link rel="stylesheet" href="./css/footer.css">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/aos.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/animate.min.css">
<script src="https://kit.fontawesome.com/d9f7ec7b29.js" crossorigin="anonymous"></script>
<!-- <script async defer src="https://buttons.github.io/buttons.js"></script> -->
<title>Hacktoberfest 2022 - Contributors</title>
<style>
.hidden {
display: none;
}
.st0 {
fill: #FF0844;
}
</style>
</head>
<body>
<!-- Back-to-top Button -->
<!-- <button onclick="topFunction()" id="myBtn" title="Go to top"><i class="fas fa-angle-double-up"></i></button> -->
<button id="back-to-top-btn"><i class="fas fa-angle-double-up"></i></button>
<!--
__ __ __ __ __ ____ __
/ / / /____ _ _____ / /__ / /_ ____ / /_ ___ _____ / __/___ _____ / /_
/ /_/ // __ `// ___// //_// __// __ \ / __ \ / _ \ / ___// /_ / _ \ / ___// __/
/ __ // /_/ // /__ / ,< / /_ / /_/ // /_/ // __// / / __// __/(__ )/ /_
/_/ /_/ \__,_/ \___//_/|_| \__/ \____//_.___/ \___//_/ /_/ \___//____/ \__/
i just want a t-shirt at this point
-->
<!--Navbar-->
<nav class="navbar navbar-expand-lg navbar-light fixed-top shadow-sm">
<a class="navbar-brand" href="/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"
id="Layer_1" x="0px" y="0px" viewBox="0 0 300 300" style="enable-background:new 0 0 300 300;"
xml:space="preserve" role="img" aria-labelledby="dyn2wm4vin1xgraye3ggy9kf12oaz8a" class="header__logo"
width="50px" height="50px">
<title id="dyn2wm4vin1xgraye3ggy9kf12oaz8a">Hacktoberfest</title>
<path class="st0"
d="M0.7,0.7v298.7h298.7V0.7H0.7z M197.8,271.4l-32-32v-95.6l-31.4,31.4v79l-17.3,17.3L99.8,254V70.4L95,65.6 L73,87.7L61.7,76.5l47.8-47.8l0.1,0.1l0,0l1.9,1.8l22.8,22.8V136l31.4-31.4V70.2L150,54.4l25.8-25.8l24.7,24.7v169.1l12.1,12.1 l14.7-14.7l11.1,11.1L197.8,271.4z">
</path>
</svg>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01"
aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor01">
<ul class="navbar-nav mr-auto" id="menu">
<!-- <p>hello</p> -->
</ul>
</div>
</nav>
<div class="content">
<div class="container">
<span class="heading"><b>CONTRIBUTORS</b> </span>
<div class="heart"></div>
<div class="tdnn">
<div class="moon">
</div>
</div>
<div class="d-flex justify-content-between align-items-center">
<p class=" rubberBand delay-4s" >Add yourself to the list if you contribute.</p>
<div class="inputs mr-3">
<i class="fa fa-search"></i>
<input type="text" id="search" class="form-control " placeholder="Search Contributors..">
</div>
</div>
<div>
<a class="github-button" href="https://github.com/fineanmol/Hacktoberfest2022" data-icon="octicon-star"
data-size="large" data-show-count="true" aria-label="Star fineanmol/Hacktoberfest2022 on GitHub">To
Get "HacktoberFest-Accepted" label, Star ✩ the repo </a>
</div>
<hr style="width:90%">
</div>
<div class="container-fluid">
<!-- Add to the bottom of the list -->
<div class="box mx-auto my-5 justify-content-center" id="contributors" data-aos="zoom-in-down"></div>
</div>
</div>
<!-- Please maintain the alignment... -->
<div class="box mx-auto my-5 justify-content-center" id="box">
<a data-aos="zoom-in-down" class="btn btn-outline-secondary btn-lg load-more" onclick="loadMore()" id="loadMore"><u>Load More</u></a>
</div>
</div>
</div>
</div>
<div class="footer mt-auto py-3 bg-light text-center">
<div class="container">
<span class="text-muted"><div id="stats" style="margin-top: 1rem;"></div></span>
</div>
</div>
<footer>
<div class="footer-content">
<h3>Hacktoberfest 2022</h3>
<p>This Project is participating in <b>Hacktoberfest</b>. Copyright © 2022.</p>
<div class="footer-menu">
<ul class="socials">
<li><a href="https://www.facebook.com/fineanmol"><i class="fa fa-facebook"></i></a></li>
<li><a href="https://twitter.com/fineanmol"><i class="fa fa-twitter"></i></a></li>
<li><a href="https://www.instagram.com/fineanmol"><i class="fa fa-instagram"></i></a></li>
<li><a href="https://www.instagram.com/fineanmol"><i class="fa fa-youtube"></i></a></li>
<li><a href="https://www.linkedin.com/in/fineanmol/"><i class="fa fa-linkedin-square"></i></a></li>
</ul>
</div>
</div>
</footer>
<script>
// Contributors array
const Contributors = contributors;
const searchbox = document.getElementById('search');
let searchResult = null;
let initialContributorsNumber = 72;
console.log(contributors)
function filterUsers(str='ContributorName', array) {
const inputString = typeof str === 'string' ? str.toLowerCase() : '';
var fullName=''
if (str == '') return "Cannot be empty, please enter a name"
else return array.filter((item) => {
const fullName = item.fullname || '';
return fullName.toLowerCase().includes(inputString)
})
}
function render(array) {
array.forEach((item) => {
let username = document.createElement('span');
username.innerHTML = item.fullname;
let user = document.createElement('a');
user.className = 'box-item'
user.setAttribute('href', item.username)
user.setAttribute('id', item.id)
user.append(username)
if (item.id <= initialContributorsNumber) {
document.getElementById('contributors').append(user)
}
})
}
// Load contributors after document loads.
render(contributors);
function loadMore() {
if (initialContributorsNumber >= contributors.length) {
render(contributors)
} else {
initialContributorsNumber += 84;
document.getElementById('contributors').innerHTML = "<div class='text-center' id='loading'>Loading...</div>"
render(contributors)
document.querySelectorAll('a.box-item').forEach(con => {
// console.log(con.href)
con.innerHTML += `<img loading="lazy" src="https://avatars.githubusercontent.com/${con.href.split('https://github.com/')[1]}">`
})
document.getElementById('loading').setAttribute('hidden', true)
if (initialContributorsNumber >= contributors.length) {
document.getElementById('loadMore').setAttribute('hidden', true)
}
}
}
document.querySelectorAll('a.box-item').forEach(con => {
// console.log(con.href)
con.innerHTML += `<img loading="lazy" src="https://avatars.githubusercontent.com/${con.href.split('https://github.com/')[1]}">`
})
searchbox.addEventListener('keyup', async (e) => {
searchbox.value !== '' ? document.getElementById('loadMore').classList.add('hidden') : document.getElementById('loadMore').classList.remove('hidden')
searchResult = await filterUsers(e.target.value, contributors)
document.getElementById('contributors').innerHTML = e.target.value !== '' ? "<div class='text-center' id='loading'>Loading...</div>" : ''
e.target.value !== '' ?
searchResult.forEach((item) => {
let username = document.createElement('span');
username.innerHTML = item.fullname;
let user = document.createElement('a');
user.className = 'box-item'
user.setAttribute('href', item.username)
user.append(username)
document.getElementById('contributors').append(user)
})
:
contributors.forEach((item) => {
let username = document.createElement('span');
username.innerHTML = item.fullname;
let user = document.createElement('a');
user.className = 'box-item'
user.setAttribute('href', item.username)
user.append(username)
if (item.id <= initialContributorsNumber) {
document.getElementById('contributors').append(user)
}
})
document.querySelectorAll('a.box-item').forEach(con => {
// console.log(con.href)
con.innerHTML += `<img loading="lazy" src="https://github.com/${con.href.split('https://github.com/')[1]}.png">`
})
document.getElementById('loading').setAttribute('hidden', true)
})
function switchTheme(e) {
if (e.target.checked) {
document.documentElement.setAttribute('data-theme', 'dark');
localStorage.setItem('theme', 'dark');
} else {
document.documentElement.setAttribute('data-theme', 'light');
localStorage.setItem('theme', 'light');
}
}
// toggleSwitch.addEventListener('change', switchTheme);
const spans = document.querySelectorAll('.word span');
spans.forEach((span, idx) => {
span.addEventListener('click', (e) => {
e.target.classList.add('active');
});
span.addEventListener('animationend', (e) => {
e.target.classList.remove('active');
});
// Initial animation
setTimeout(() => {
span.classList.add('active');
}, 750 * (idx + 1))
});
/* Back-to-top button functionality */
const backToTopButton = document.querySelector("#back-to-top-btn");
window.addEventListener("scroll", scrollFunction);
function scrollFunction() {
if (window.pageYOffset > 300) { // Show backToTopButton
if (!backToTopButton.classList.contains("btnEntrance")) {
backToTopButton.classList.remove("btnExit");
backToTopButton.classList.add("btnEntrance");
backToTopButton.style.display = "block";
}
}
else { // Hide backToTopButton
if (backToTopButton.classList.contains("btnEntrance")) {
backToTopButton.classList.remove("btnEntrance");
backToTopButton.classList.add("btnExit");
setTimeout(function () {
backToTopButton.style.display = "none";
}, 250);
}
}
}
backToTopButton.addEventListener("click", smoothScrollBackToTop);
function smoothScrollBackToTop() {
const targetPosition = 0;
const startPosition = window.pageYOffset;
const distance = targetPosition - startPosition;
const duration = 750;
let start = null;
window.requestAnimationFrame(step);
function step(timestamp) {
if (!start) start = timestamp;
const progress = timestamp - start;
window.scrollTo(0, easeInOutCubic(progress, startPosition, distance, duration));
if (progress < duration) window.requestAnimationFrame(step);
}
}
function easeInOutCubic(t, b, c, d) {
t /= d / 2;
if (t < 1) return c / 2 * t * t * t + b;
t -= 2;
return c / 2 * (t * t * t + 2) + b;
};
</script>
<!-- <script src="/scripts/scroll.js"></script> -->
<script src="./scripts/menu.js"></script>
<!-- <div class="container">
<div id="stats" style="margin-top: 1rem;">
<div>Made with ❤️ by <a href="https://twitter.com/fineanmol">Anmol Agarwal</a>. © Copyright 2022 </div></div>
</div> -->
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
AOS.init();
</script>
<script>
document.getElementById('stats').innerHTML =
'You guys are awesome, we have again passed the github rate this hour. <a href="https://github.com/fineanmol/Hacktoberfest2022" target="_blank">Here</a> is a link to check out our repo`s live stats.';
$('.tdnn').click(function () {
$("body").toggleClass('light');
$(".moon").toggleClass('sun');
$(".tdnn").toggleClass('day');
});
</script>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
</body>
</html>