-
Notifications
You must be signed in to change notification settings - Fork 0
/
publications.html
317 lines (285 loc) · 10.7 KB
/
publications.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
<!DOCTYPE HTML>
<!-- This website was created by Madison Parks and Brian M. Schilder -->
<!-- IMPORTANT!: All csv's must be saved as "CSV UTF-8 (Comma delimited) (.csv)" or else some characters will be turned into question mark diamonds. -->
<html>
<head>
<title>Raj Lab - [Publications]</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<!-- 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> -->
<!-- jquery -->
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<!-- Datatables -->
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8"
src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.js"></script>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.16/js/dataTables.bootstrap.min.js"></script>
<script src="https://cdn.datatables.net/select/1.2.7/js/dataTables.select.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.flash.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.html5.min.js"></script>
<link href="https://cdn.datatables.net/1.10.13/css/dataTables.bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="https://cdn.datatables.net/1.10.13/js/dataTables.bootstrap.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/arrow_bounce.css" rel="stylesheet" type="text/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" />
</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" id="Publications">
<header>
<h1><i class="fas fa-book-open"></i> Publications</h1>
<p>Dynamically search and download a list of all of our publications
via the <a id="tabLink"> Datatable View </a>.
<br>
Also available on
<a href="https://scholar.google.com/citations?user=_1soEyEAAAAJ&hl=en" target="_blank">
Google Scholar
</a>.
<br><br>
Jump to <a href="#Presentations">Presentations</a>
</p>
</header>
</div>
<div class="container publicationTabs" id="publicationTabs">
<div class="row">
<div class="col-xs-12 ">
<nav>
<div class="nav nav-tabs nav-fill" id="nav-tab" role="tablist">
<a class="nav-item nav-link" id="pubsSections_tab_button" data-toggle="tab"
href="#pubsSections_tab" role="tab" aria-controls="pubsSections_tab"
aria-selected="true">
Section View
</a>
<a class="nav-item nav-link active" id="pubsTable_tab_button" data-toggle="tab"
href="#pubsTable_tab" role="tab" aria-controls="pubsTable_tab" aria-selected="false">
Datatable View
</a>
</div>
</nav>
<div class="tab-content py-3 px-3 px-sm-0" id="nav-tabContent">
<!-- Section View -->
<div class="tab-pane fade" id="pubsSections_tab" role="tabpanel"
aria-labelledby="pubsSections_tab">
<!-- <input class="form-control" type="text" placeholder="Search" aria-label="Search"> -->
<div id="pubDivContainer" class="container"> </div>
</div>
<!-- Datatable View -->
<div class="tab-pane fade show active" id="pubsTable_tab" role="tabpanel"
aria-labelledby="pubsTable_tab">
<div id="pubContainer" class="container">
<table id="pubsTable" class="pubsTable compact" cellspacing="0" cellpadding="0"
border="0" width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<br><br>
<div class="inner" id="Presentations">
<header>
<h1> <i class="far fa-file-powerpoint"></i> Presentations</h1>
<p>View, share, or download our presentations from professional conferences, journal clubs, and lab
meetings
<br>
Jump to <a href="#Publications">Publications</a>
</p>
</header>
<!-- Container for javascript rendering -->
<div id="slideshare" class="row"></div>
</div>
</section>
<!-- Automatically generate PRESENTATIONS from file -->
<script>
d3.csv("./documents/Presentations.csv")
.then(function (data) {
// Method 2: As Divs
var createDivs = function (data) {
var createHTML = function (d) {
var htmlStr =
"<div class='presentationsDiv'>\
<iframe src='" + d.iframe + "'\
width='595' height='485'\
frameborder='0' marginwidth='0' marginheight='0' scrolling='no'\
style='margin-bottom:5px; max-width: 100%;'\
allowfullscreen> </iframe>\
<div style='margin-bottom:5px'> <strong>\
<a href='" + d.URL + "'\
title='" + d.Title + "' target='_blank'>" + d.Title + "</a> </strong>\
by <strong><a href='" + d.Author_URL + "' target='_blank'>" + d.Authors + "</a></strong>\
</div>\
</div> <br><br>"
return htmlStr
}
data.forEach(d => {
var htmlStr = createHTML(d);
$('#slideshare').append(htmlStr);
});
}
createDivs(data);
});
</script>
<!-- Automatically generate publications from file -->
<script>
$('#tabLink').click(function (e) {
$('#publicationTabs a[href="#pubsTable_tab"]').tab('show');
})
d3.csv("./documents/Publications.csv")
.then(function (data) {
// Method 2: As Divs
var createDivs = function (data) {
var createHTML = function (d) {
var issue = "";
if (d.Volume !== "") { issue += "Vol. " + d.Volume + ", " }
if (d.Number !== "") { issue += "Num. " + d.Number + ", " }
if (d.Pages !== "") { issue += "Pgs. " + d.Pages }
var htmlStr =
"<div class='publicationsDiv'>\
<a href='"+ d.Link + "' target='_blank' class='TitleLink'> <h3 class='TitleDiv'><i class='fas fa-external-link-alt'></i> " + d.Title + "</h3></a>\
<div class='pubDetails'>\
<div class='row'>\
<div class='col-md-5'>\
<h5 class='Publication'>Publication:<br><p>"+ d.Journal + " <year><br>(" + d.Year + ")</year>" + "</p></h5>\
<h5 class='Issue'> <p>"+ issue + "</p></h5>\
</div>\
<div class='col-md-7'>\
<h5 class='Authors'>Authors: <br><p>"+ d.Authors + "</p></h5>\
<div>\
</div>\
</div>"
return htmlStr
}
data.forEach(d => {
var htmlStr = createHTML(d);
$('#pubDivContainer').append(htmlStr);
});
}
createDivs(data);
});
</script>
<!-- Method 1: Publication as Datatable -->
<script>
d3.csv("./documents/Publications.csv")
.then(function (data) {
// Remove empty rows
const obj = Object.values(data)
.filter(({ Authors }) => Authors !== "")
var result = Object.keys(obj).map(function (key) {
var entry = obj[key]
return Object.values(entry)
});
result.pop(); // Remove header info as row
return result
})
.then(function (result) {
var createDatatable = function (result) {
// $('#pubsTable thead tr:eq(1) th').each(function () {
// var title = $('#pubsTable thead tr:eq(0) th').eq($(this).index()).text();
// $(this).html('<input type="text" placeholder="Search ' + title + '" />');
// });
var table = $('#pubsTable').DataTable({
data: result,
scrollY: "800px",
scrollCollapse: true,
scroller: true,
paging: false,
responsive: true,
dom: 'Bfrtip',
buttons: [{ "extend": "csv", "text": "<i class='fas fa-file-csv' style='font-size: 35px;vertical-align: middle; padding-bottom: 7px;'></i>", "className": "csvButton" }],
aoColumns: [
{
"title": "#", "className": "pubsHeader",
"render": function (data, type, row, meta) { return (row[9]) }
},
{
"title": "Authors", "className": "pubsHeader",
"render": function (data, type, row, meta) {
// row[0].split(", ")
return (row[0])
}
},
{
"title": "Title", "className": "pubsHeader", "width": "40%",
"render": function (data, type, row, meta) {
data = '<div class="paperLink"><a class="paperLink" href="' + row[8] + '" target="_blank"> <i class=\'fas fa-external-link-alt\'></i> ' + row[1] + '</a></div>';
return data
}
},
{
"title": "Journal", "className": "pubsHeader",
"render": function (data, type, row, meta) { return (row[2]) }
},
{
"title": "Issue", "className": "pubsHeader",
"render": function (data, type, row, meta) {
if (type === 'display') {
var issue = "";
if (row[3] !== "") { issue += "Vol. " + row[3] + ", " }
if (row[4] !== "") { issue += "<br>Num. " + row[4] + ", " }
if (row[5] !== "") { issue += "<br>Pgs. " + row[5] }
data = issue;
}
return data;
}
},
{
"title": "Year", "className": "pubsHeader",
"render": function (data, type, row, meta) { return (row[6]) }
}
],
order: [],
orderCellsTop: true,
fixedHeader: true
})
// Apply the search
// table.columns().every(function (index) {
// $('#pubsTable thead tr:eq(1) th:eq(' + index + ') input').on('keyup change', function () {
// table.column($(this).parent().index() + ':visible')
// .search(this.value)
// .draw();
// });
// });
}
createDatatable(result);
}).then(function () {
// !IMPORTANT! Resize column headers after tab is clicked
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
$($.fn.dataTable.tables(true)).DataTable()
.columns.adjust();
});
})
// <!-- Correct vertical alignment of in-page links-->
var shiftWindow = function () { scrollBy(0, -120) };
if (location.hash) shiftWindow();
window.addEventListener("hashchange", shiftWindow);
</script>
<!-- Footer -->
<section id="footer"> </section>
</body>
</html>