-
Notifications
You must be signed in to change notification settings - Fork 0
/
team.html
executable file
·224 lines (189 loc) · 9.53 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
<!DOCTYPE HTML>
<!-- This website was created by Madison Parks and Brian M. Schilder -->
<html>
<head>
<title>Raj Lab @ MSSM - Team</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Favicon -->
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
<!-- D3 -->
<script src="https://d3js.org/d3.v5.min.js"></script>
<!-- <script src="https://d3js.org/d3.v4.min.js"></script> -->
<!-- Local Scripts -->
<script src="./assets/js/jquery.min.js"></script>
<!-- Icons -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css"
integrity="sha384-gfdkjb5BdAXd+lj+gudLWI+BXq4IuLW5IT+brZEZsLFm++aCMlF1V92rMkPaX4PP" crossorigin="anonymous">
<!--CSS-->
<link href="./assets/css/main.css" rel="stylesheet" type="text/css" />
<!-- Bootstrap-->
<script src="./assets/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="./assets/css/bootstrap.min.css" />
<!-- Auto resize text -->
<script src="./assets/js/jquery.min.js"></script>
<!-- <script src="./assets/js/jquery.textfill.min.js"></script> -->
<!-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> -->
<script src="./assets/js/jquery.fittext.js"></script>
</head>
<body>
<!-- Insert html files -->
<script>
$(function () {
$("#background_video").load("./background_video.html");
$("#footer").load("./footer.html");
$("#navbar").load("./navbar.html");
});
</script>
<!-- Video -->
<section id="background_video"></section>
<!-- Navbar -->
<section id="navbar"></section>
<!-- Main -->
<section id="main">
<div class="inner">
<header>
<h1><i class="fas fa-users"></i>
Team Members
</h1>
</header>
<!-- PI -->
<div class="row">
<div class="tf" id="PI_card"> </div>
</div>
<!-- Team -->
<div id="team">
<div class="row" id="teamContainer"></div>
</div>
<div id="visiting_members">
<h2>Visiting Scholars & Rotation Students</h2>
<p>
<ul id="student_list"></ul>
</p>
</div>
<div id="lab_alumni">
<h2>Lab Alumni</h2>
<p>
<ul id="alumni_list"> </ul>
</p>
</div>
</section>
<!-- Automatically create Team profiles from CSV -->
<script>
d3.csv("./documents/Team.csv")
.then(function (data) {
var addLinks = function(d) {
var dict = {Email:"fa fa-envelope",
Twitter: "fa fa-twitter",
LinkedIn:"fab fa-linkedin-in",
GoogleScholar:"fa fa-google",
ResearchGate:"fab fa-researchgate",
Instagram:"fab fa-instagram",
Website:"fas fa-address-card",
GitHub:"fab fa-github"
};
var listStr = ' <ul class="list-inline">'
for (var key in dict) {
if (d[key] != ""){
listStr += '<li class="list-inline-item">\
<a class="social-icon text-xs-center" target="_blank"\
href="' + d[key] + '">\
<i class="' + dict[key] + '"></i>\
</a>\
</li>'
}
}
listStr += '</ul>'
return listStr
}
var createDivs = function (data) {
// Create PI div
var createHTML_PI = function(d){
var front = '<div class="image-flip" ontouchstart="this.classList.toggle(\'hover\');">\
<div class="mainflip">\
<div class="frontside">\
<div class="card">\
<div class="card-body text-center">\
<p><img class=" img-fluid" src="' + d.Image +'" alt="card image">\
</p>\
<h4 class="card-title">' + d.Name + ', ' + '</h4>\
<p class="card-text"> ' + d.Title + '</p>\
<a href="" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i></a>\
</div>\
</div>\
</div>'
var back = '<div class="backside">\
<div class="card">\
<div class="card-body text-center mt-4">\
<h4 class="card-title">' + d.Name + ', ' + d.Degree + '</h4>\
<p class="card-text">' + d.Bio + '</p>'
back += addLinks(d);
back += '<br></div>\
</div>\
</div>'
var cap = '</div>\
</div>'
var htmlStr = front + back + cap
return htmlStr
}
// Create all other team member divs
var createHTML = function (d) {
var front = '<div class="col-md-4">\
<div class="image-flip" ontouchstart="this.classList.toggle(\'hover\');">\
<div class="mainflip">\
<div class="frontside">\
<div class="card">\
<div class="card-body text-center">\
<p><img class="img-fluid" src="' + d.Image +'" alt="card image"></p>\
<h4 class="card-title">' + d.Name + ', ' + d.Degree + '</h4>\
<p class="card-text">' + d.Title + '</p>\
<a href="#" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i></a>\
</div>\
</div>\
</div>'
var back = '<div class="backside">\
<div class="card">\
<div class="card-body text-center mt-4">\
<h4 class="card-title">' + d.Name + ', ' + d.Degree + '</h4>\
<p class="card-text">' + d.Bio + '</p>'
back += addLinks(d)
back += '</div>\
</div>\
</div>'
var cap = '</div>\
</div>'
var htmlStr = front + back + cap
return htmlStr
}
data.forEach(d => {
if (d.Status == 'active'){
if (d.Name=='Towfique Raj'){
var htmlStr = createHTML_PI(d);
$('#PI_card').append(htmlStr);
} else {
var htmlStr = createHTML(d);
$('#teamContainer').append(htmlStr);
}
}
if (d.Status == "student"){
var visitStr = '<li><strong>' + d.Name + ', ' + d.Degree + '</strong>\
(' + d.Title + ') \
<a href="mailto:' + d.Email + '"><i class="fa fa-envelope"></i></a></li>';
$('#student_list').append(visitStr);
}
if (d.Status == "alumn"){
var almumniStr = '<li><strong>' + d.Name + ', ' + d.Degree + '</strong>\
(' + d.Title + ')';
if (d.Email != ""){
almumniStr += ' <a href="mailto:' + d.Email + '"><i class="fa fa-envelope"></i></a></li>';
}
$('#alumni_list').append(almumniStr);
}
});
}
createDivs(data);
});
</script>
<!-- Footer -->
<section id="footer"></section>
</body>
</html>