-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpeople.html
More file actions
executable file
·240 lines (192 loc) · 11.4 KB
/
people.html
File metadata and controls
executable file
·240 lines (192 loc) · 11.4 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TDC01ELJLN"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-TDC01ELJLN');
</script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="js/jquery.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/underscore-min.js"></script>
<script src="js/fa-all.js" data-auto-replace-svg="nest"></script>
<link type="text/css" rel="stylesheet" href="css/custom.css" />
<link type="text/css" rel="stylesheet" href="css/hover-min.css" />
<link type="text/css" rel="stylesheet" href="css/academicons.min.css" />
<title>VRL Lab Members</title>
<script type="text/javascript">
function draw_compact_card(profile) {
var nextPos = '';
if (profile['next'] && profile['next'].length > 0) {
nextPos = '<br><small class="text-muted">Next: ' + profile['next'] + '</small>';
}
divStr = '<div class="col-lg-2 col-md-3 col-sm-4 col-6 mb-4 text-center">';
divStr += '<div class="hvr-grow" style="cursor:pointer;" data-toggle="modal" data-target="#' + profile['id'] + '">';
divStr += '<img class="img-thumbnail rounded-circle mb-2" src="data/people/' + profile['img'] + '" style="width: 100px; height: 100px; object-fit: cover;">';
divStr += '<h6 class="mb-0" style="font-size: 0.85rem; line-height: 1.2;">' + profile['name'] + '</h6>';
divStr += '</div>';
divStr += '<div class="modal fade" id="' + profile['id'] + '" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true"><div class="modal-dialog modal-dialog-centered" role="document"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="exampleModalLongTitle">' + profile['name'] + '</h5><button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button></div> <div class="modal-body">';
if (profile['role'] == 'Alumni' && profile['next']) {
divStr += '<b>Next Position</b><p>' + profile['next'] + '</p>';
}
divStr += '<b>Biography</b><p class="text-justify">' + (profile['bio'] || profile['about']) + '</p>';
if (profile['education'] && profile['education'].length > 0) {
divStr += '<b>Education</b><br>';
for (var t = 0; t < profile['education'].length; t++) {
divStr += '<small><i class="fas fa-graduation-cap"></i> ' + profile['education'][t] + '</small><br>';
}
}
divStr += "<br><div align='center'>" + get_link_html(profile) + "</div>";
divStr += '</div></div></div></div>';
divStr += '</div>';
return divStr;
}
function get_link_html(profile) {
divStr = '';
if ('email' in profile['links']) {
divStr += '<a href="mailto:' + profile['links']['email'] + '" target="_blank" style="margin-right:5px;"><i class="fas fa-envelope fa-2x"></i></a>'
}
if ('website' in profile['links']) {
divStr += '<a href="' + profile['links']['website'] + '" target="_blank" style="margin-right:5px;"><i class="fas fa-home fa-2x"></i></a>'
}
if ('scholar' in profile['links']) {
divStr += '<a href="' + profile['links']['scholar'] + '" target="_blank" style="margin-right:5px;"><i class="ai ai-google-scholar ai-2x"></i></a>'
}
if ('orcid' in profile['links']) {
divStr += '<a href="' + profile['links']['orcid'] + '" target="_blank" style="margin-right:5px;"><i class="ai ai-orcid ai-2x"></i></a>'
}
if ('twitter' in profile['links']) {
divStr += '<a href="' + profile['links']['twitter'] + '" target="_blank" style="margin-right:5px;"><i class="fab fa-twitter fa-2x"></i></a>'
}
if ('linkedin' in profile['links']) {
divStr += '<a href="' + profile['links']['linkedin'] + '" target="_blank" style="margin-right:5px;"><i class="fab fa-linkedin fa-2x"></i></a>'
}
if ('github' in profile['links']) {
divStr += '<a href="' + profile['links']['github'] + '" target="_blank" style="margin-right:5px;"><i class="fab fa-github fa-2x"></i></a>'
}
return divStr
}
function draw_card(profile) {
divStr = '<div class="col-lg-4 col-md-6 col-sm-12 mb-4 d-flex align-items-stretch">';
divStr += '<div class="card w-100 shadow-sm"><img class="card-img-top" src="data/people/' + profile['img'] + '" alt="Card image cap" style="height: 250px; object-fit: cover;"> <div class="card-body d-flex flex-column">';
divStr += '<h5 class="card-title">' + profile['name'] + '</h5>';
divStr += '<p class="card-text">' + profile['about'] + '</p>';
divStr += '<div class="mt-auto">';
divStr += get_link_html(profile);
divStr += '<button type="button" class="btn btn-outline-secondary btn-sm" data-toggle="modal" style="width:100%; color:#002776; margin-top:10px;" data-target="#' + profile['id'] + '"><i class="fas fa-expand-arrows-alt"></i> More details</button>';
divStr += '</div>';
divStr += '<div class="modal fade" id="' + profile['id'] + '" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true"><div class="modal-dialog modal-dialog-centered" role="document"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="exampleModalLongTitle">' + profile['name'] + '</h5><button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button></div> <div class="modal-body"><b>Biography</b><p class="text-justify">' + profile['bio'] + '</p>';
if (profile['education'].length > 0) {
divStr += '<b>Education</b><br>';
for (var t = 0; t < profile['education'].length; t++) {
divStr += '<small><i class="fas fa-graduation-cap"></i> ' + profile['education'][t] + '</small><br>';
}
}
divStr += "<br><div align='center'>" + get_link_html(profile) + "</div>";
divStr += '</div></div></div></div>';
divStr += '</div></div></div>';
return divStr;
}
function prepare_user_cards(profiles) {
console.log(profiles);
var typeRank = ['PI', 'Postdoc', 'PhD', "Master's", 'Undergraduate', 'Collaborator', 'Faculty', 'Alumni', 'Intern'];
var mstr = '';
// Separate PI and Postdocs to handle them together or separately
var handledRoles = [];
// Group PI and Postdocs
var piList = _.filter(profiles, function (p) { return p['role'] == 'PI'; });
var postdocList = _.filter(profiles, function (p) { return p['role'] == 'Postdoc'; });
if (piList.length > 0 || postdocList.length > 0) {
mstr += '<br><h3>PI & Postdoc(s)</h3>';
mstr += '<div class="row mt-3 d-flex align-items-stretch">';
// Sort PI first
var combined = _.sortBy(piList, 'name').concat(_.sortBy(postdocList, 'name'));
for (var i = 0; i < combined.length; i++) {
mstr += draw_card(combined[i]);
}
mstr += '</div>';
handledRoles.push('PI', 'Postdoc');
}
for (var t = 0; t < typeRank.length; t++) {
if (handledRoles.includes(typeRank[t])) continue;
plist = _.filter(profiles, function (p) { return p['role'] == typeRank[t]; });
plist = _.sortBy(plist, function (p) { return p['name']; });
if (plist.length > 0) {
var extension = '';
if (['PhD', "Master's", 'Undergraduate'].includes(typeRank[t])) {
extension = ' students';
}
if (typeRank[t] == 'Collaborator') {
extension = 's';
}
if (typeRank[t] == 'Alumni') {
extension = ' and past collaborators';
}
if (typeRank[t] == 'Intern') {
extension = 's';
}
if (typeRank[t] == 'Faculty') {
extension = ' collaborators';
}
mstr += '<br><h3>' + typeRank[t] + extension + '</h3>';
if (['Alumni', 'Faculty', 'Collaborator'].includes(typeRank[t])) {
mstr += '<div class="row mt-3">';
for (var i = 0; i < plist.length; i++) {
mstr += draw_compact_card(plist[i]);
}
mstr += '</div>';
} else {
mstr += '<div class="row mt-3 d-flex align-items-stretch">';
for (var i = 0; i < plist.length; i++) {
mstr += draw_card(plist[i]);
}
mstr += '</div>';
}
}
}
$('#member-container').append(mstr);
}
$(document).ready(function () {
$('#header-container').load('template_header.html');
$('#footer-container').load('template_footer.html');
$.getJSON('data/people/people.json',
function (json) {
prepare_user_cards(json);
});
});
</script>
</head>
<body>
<div id="header-container"></div>
<!--<div class="jumbotron" style="background-image: url(img/bg-people.jpeg);"></div>-->
<div class="container">
<div class="row">
<div class="alert alert-primary" role="alert" style="margin-top:20px;">
<i class="fas fa-puzzle-piece"></i> We are always looking for highly motivated students<sup>*</sup> to
join our group. Write me an e-mail if you are interested.<br>
<small><sup>*</sup> In Turkish, we have two words for student: "talebe" for person who demands knowledge
and "öğrenci" for person who learns. In research, a talebe is a never-ending position and we want to
work with them.</small>
<br><br>
<i class="fas fa-solid fa-user-plus"></i> Open positions:
<ul>
<li>2 PhD students and 1 Postdoctoral researcher for <a
href="projects/tubitak1001election.html"><b>TUBITAK 1001 project</b></a></li>
</ul>
</div>
</div>
<div id="member-container"></div>
<div class="row" class="margin-top:50px;"></div>
</div>
<br>
<div id="footer-container"></div>
</body>
</html>