-
Notifications
You must be signed in to change notification settings - Fork 2
/
publications.html
115 lines (82 loc) · 2.57 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
---
layout: default
title: Klavins Lab | Publications
---
<div class='contain'>
<div class='heading'>
<h1>
<span id='papers-heading' class='clickable-heading'>Papers</span>
<span id='reports-heading' class='clickable-heading' style='display: none; color: #ddd'>Reports</span>
<span id='theses-heading' class='clickable-heading' style='display: none; color: #ddd'>Theses</span>
</h1>
</div>
<div id='papers'>
{% assign y = 3000 %}
<ul class='pubs'>
{% for p in site.data.publications %}
{% if y != p.year %}
{% assign y = p.year %}
<h3> {{ y }} </h3>
{% endif %}
{% include paper.html param=p %}
{% endfor %}
</ul>
</div>
<div id='reports' style='display: none">
{% assign y = 3000 %}
<ul class='pubs'>
{% for p in site.data.reports %}
{% if y != p.year %}
{% assign y = p.year %}
<h3> {{ y }} </h3>
{% endif %}
{% include paper.html param=p %}
{% endfor %}
</ul>
</div>
<div id='theses' style='display: none">
{% assign y = 3000 %}
<ul class='pubs'>
{% for p in site.data.theses %}
{% if y != p.year %}
{% assign y = p.year %}
<h3> {{ y }} </h3>
{% endif %}
{% include paper.html param=p %}
{% endfor %}
</ul>
</div>
<br />
<div class='clear: both'></div>
<script>
document.getElementById('nav-publications').className += "highlight";
var p = document.getElementById("papers-heading");
var r = document.getElementById("reports-heading");
var t = document.getElementById("theses-heading");
p.addEventListener('click', function () { show(this) });
r.addEventListener('click', function () { show(this) });
t.addEventListener('click', function () { show(this) });
function show(ob, n) {
var name = n;
if (arguments.length != 2) {
var name = ob.id.split('-')[0];
}
console.log("name = " + name);
p.style.color = '#ddd';
r.style.color = '#ddd';
t.style.color = '#ddd';
document.getElementById("papers").style.display = 'none';
document.getElementById("reports").style.display = 'none';
document.getElementById("theses").style.display = 'none';
document.getElementById(name + "-heading").style.color = 'black';
document.getElementById(name).style.display = 'block';
setCookie("paper-type", name, 30);
}
var choice = getCookie("paper-type");
if (choice != "") {
show(null, choice);
} else {
setCookie("paper-type", 'papers', 30);
}
</script>
</div>