forked from DSC-HIT/DSC-HIT-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathteam.html
360 lines (313 loc) · 12.5 KB
/
team.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
name="viewport"
/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="theme-color" content="#ffffff" />
<!-- Favicons -->
<link rel="apple-touch-icon" href="favicon.png" />
<link rel="icon" href="favicon.png" />
<!-- Fonts and icons -->
<link
rel="stylesheet"
type="text/css"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:400,700|Material+Icons"
/>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css"
/>
<link rel="stylesheet" href="assets/css/material-kit.css?v=2.0.2" />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<!-- Documentation extras -->
<link rel="stylesheet" href="assets/css/styles.css" />
<link rel="stylesheet" href="assets/css/team.css" />
<link rel="stylesheet" href="assets/css/navbar.css" />
<link
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
rel="stylesheet"
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN"
crossorigin="anonymous"
/>
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/flickity.min.css"
/>
<script src="https://unpkg.com/[email protected]/dist/flickity.pkgd.min.js"></script>
<link
href="https://fonts.googleapis.com/css?family=Open+Sans"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<title>Team | DSC HIT</title>
<style>
body {
overflow-x: hidden;
}
#top-button {
font-size: 20px;
transition: 0.3s ease;
}
.grid-item {
width: 25%;
}
.grid-item--width2 {
width: 50%;
}
.img-fluid {
border-radius: 5px 5px;
}
.team-member-details {
cursor: pointer;
}
/* Preloader */
#preloader {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #fff;
z-index: 99;
}
#status {
width: 200px;
height: 200px;
position: absolute;
left: 50%;
top: 50%;
background: #fff;
background-repeat: no-repeat;
background-position: center;
margin: -100px 0 0 -100px;
}
</style>
<!-- iframe removal -->
</head>
<body class="landing-page" name="top" id="top">
<div id="preloader">
<lottie-player
id="status"
src="https://assets6.lottiefiles.com/private_files/lf30_8a9atN.json"
mode="bounce"
background="#FFFFFF"
speed="1"
loop
autoplay
></lottie-player>
</div>
<!-- ============================================ Navbar ============================================ -->
<nav
class="navbar navbar-color-on-scroll navbar-transparent fixed-top navbar-expand-lg"
color-on-scroll="100"
id="sectionsNav"
>
<!-- ===== Navbar through JS ===== -->
</nav>
<!-- ============================================ /.Navbar ============================================ -->
<div class="main main-raised margin-t-0">
<p> </p>
<p> </p>
<div class="container">
<div class="container-page">
<!-- ============================================ **** Banner **** ============================================ -->
<div class="row mt-5">
<!-- First Column -->
<div class="col-lg-6">
<p> </p>
<h2 class="title">Team</h2>
<h5 class="description">
One log creates a small fire, adequate to warm you up, add just
a few more pieces to blast an immense bonfire, large enough to
warm up your entire circle; needless to say that individuality
counts but teamwork dynamites. At
<b class="blue_text">DSC HIT</b>
celebrate teamwork and attribute the success of DSC to the
wonderful individuals who put untiring efforts for it.
</h5>
<p> </p>
</div>
<!-- Second Column -->
<div class="col-lg-6">
<img class="img-fluid" src="assets/img/kit/team.png" />
</div>
</div>
<div class="container no-padding container-sub-page">
<!-- ============================================ Loading Animation ============================================ -->
<div id="loading-animation">
<div class="google-loader">
<div class="dot blue"></div>
<div class="dot red"></div>
<div class="dot yellow"></div>
<div class="dot green"></div>
</div>
</div>
<div id="container-team" class="row">
<!-- ===== Here the Team will Appear ===== -->
</div>
<div id="prev-team-wrapper">
<div id="prev-member-heading">
<a id="load-prev-team" onclick="loadPrevTeam()"
>View Core 2019 - 2020</a
>
</div>
<div id="container-team-prev" class="row">
<!-- ===== Here the Previous Team will Appear ===== -->
</div>
</div>
</div>
</div>
</div>
<!-- ============================================ **** Footer **** ============================================ -->
<div id="footer">
<!-- ===== Footer Through JS ===== -->
</div>
<!-- ============================================ /. Footer ============================================ -->
</div>
<script src="assets/js/app.js"></script>
<script src="assets/js/navbar.js"></script>
<script src="assets/js/footer.js"></script>
<!-- Core JS Files -->
<script src="assets/js/core/jquery.min.js"></script>
<script src="assets/js/core/popper.min.js"></script>
<script src="assets/js/style/bootstrap-material-design.js"></script>
<!-- Material Kit Core initialisations of plugins and Bootstrap Material Design Library -->
<script src="assets/js/style/material-kit.js?v=2.0.2"></script>
<script src="assets/assets-custom/js/material-kit-demo.js"></script>
<!-- <script src="assets/assets-custom/js/GridHorizontal.js"></script> -->
<!-- <script src="https://unpkg.com/packery@2/dist/packery.pkgd.min.js"></script> -->
<!-- <script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.min.js"></script> -->
<script src="assets/assets-custom/main.js"></script>
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<!--<script src="assets/assets-custom/index.js"></script>-->
<script>
$(window).on("load", function () {
// makes sure the whole site is loaded
$("#status").fadeOut(); // will first fade out the loading animation
$("#preloader").delay(450).fadeOut("slow"); // will fade out the white DIV that covers the website.
$("body").delay(450).css({ overflow: "visible" });
});
$("document").ready(function () {
/* ============================================ Getting Link Type ============================================ */
function getLinks(links) {
var result = "";
links.forEach(function (link) {
if (link.linkType === "Twitter") {
result += `<li style="color:rgb(0,101,202);">
<a id="social_link1" href="${link.link}" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i></a>
</li>`;
}
if (link.linkType == "LinkedIn") {
result += `<li style="color:rgb(0,101,202);">
<a id="social_link1" href="${link.link}" target="_blank"><i class="fa fa-linkedin" aria-hidden="true"></i></a>
</li>`;
}
if (link.linkType == "Github") {
result += `<li style="color:rgb(0,101,202);">
<a id="social_link1" href="${link.link}" target="_blank"><i class="fa fa-github" aria-hidden="true"></i></a>
</li>`;
}
if (link.linkType == "Facebook") {
result += `<li style="color:rgb(0,101,202);">
<a id="social_link1" href="${link.link}" target="_blank"><i class="fa fa-facebook" aria-hidden="true"></i></a>
</li>`;
}
if (link.linkType == "Dribbble") {
result += `<li style="color:rgb(0,101,202);">
<a id="social_link1" href="${link.link}" target="_blank"><i class="fa fa-dribbble" aria-hidden="true"></i></a>
</li>`;
}
});
return result;
}
/* ============================================ Getting Template ============================================ */
function getTemplate(member) {
var template = `<div class="col-lg-4 container-team-member">
<div class="clearfix float-my-children">
<img src="${member.displayPicture}">
<div class="team-member-details">
<span class="team-member-name blue_text" style="font-weight:500;" onclick="myfun('${
member.id
}')">
<b>${member.name}</b>
</span><br>
<span style="font-weight:300;">${member.description}</span>
<span>
<ul>${getLinks(member.links)}</ul>
</span>
</div>
</div>
</div>`;
return template;
}
var html_curr = "";
var html_prev = "";
/* ============================================ Sorting by Order ============================================ */
function GetSortOrder(prop) {
return function (a, b) {
if (a[prop] > b[prop]) {
return 1;
} else if (a[prop] < b[prop]) {
return -1;
}
return 0;
};
}
/* ============================================ fetching Data by API ============================================ */
var settings = {
url: "https://dschit.herokuapp.com/team",
method: "GET",
timeout: 0,
};
$.ajax(settings).done(function (members) {
members.sort(GetSortOrder("id"));
members.forEach(function (member) {
if (member.year === "2020 - 2021") {
html_curr += getTemplate(member);
} else {
html_prev += getTemplate(member);
}
});
/* ============================================ Stopping Animation and Placing Data ============================================ */
document.getElementById("loading-animation").style.display = "none";
$("#container-team").append(html_curr);
$("#container-team-prev").append(html_prev);
});
});
/* ============================================ Function for Loading Previous Team ============================================ */
function loadPrevTeam() {
document.getElementById("container-team-prev").style.display = "flex";
document.getElementById("prev-member-heading").style.borderRadius =
"0 0 10px 60px";
document.getElementById("prev-member-heading").style.marginRight = "0";
document.getElementById("load-prev-team").innerHTML =
"Core 2019 - 2020";
}
/* ============================================ Funtion for Moving to Particular Member Page ============================================ */
function myfun(targetid) {
var html = "";
var settings = {
url: "https://dschit.herokuapp.com/team",
method: "GET",
timeout: 0,
};
$.ajax(settings).done(function (members) {
members.forEach(function (member) {
if (member.id == targetid)
window.location = "member.html?id=" + member.id;
});
});
}
</script>
</body>
</html>