-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
127 lines (94 loc) · 3.67 KB
/
index.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
---
layout: default
---
<div class="jumbotron jumbotron-fluid bg-dark banner">
<div class="jumbotron-background">
<img src="{{ site.baseurl }}/assets/background.jpg" class="blur" />
</div>
<div class="container text-white">
<div class="page-heading">
<h1>{{ site.title }}</h1>
<hr class="small">
<span class="page-subheading">{{ site.description }}</span>
</div>
</div>
</div>
<!--
<img src="{{ site.baseurl }}/assets/Logo_ELLIS.png" class="img-responsive mw-80 float-right" />
-->
<div class="container-md">
<div class="row">
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1">
<!-- Information -->
<img src="{{ site.baseurl }}/assets/ELLIS_Aalto.png" style="width:100%" />
<div class="jumbotron information">
{{ site.information | markdownify }}
<div class="text-center">
<a class="btn btn-success btn-lg register-btn" href="{{ site.registration }}">{% if site.registration %}Register for the seminar{% else %}Registration closed{% endif %}</a>
</div>
{{ site.details | markdownify }}
<div id="hosted-by">Seminar organizers {{ site.organizers | markdownify | remove: '<p>' | remove: '</p>' }}</div>
</div>
<div class="posts-list" id="talk-list">
<!-- List talks -->
{% for talk in site.data.talks %}
<article class="post-preview" datetime="{{ talk.date | date: "%s" }}">
<h2 class="post-title">{{ talk.title }}</h2>
{% if talk.presenter %}
<h3 class="post-subtitle"><a href="{{talk.url}}" target="_blank">{{ talk.presenter }}</a> ({{ talk.affiliation }})</h3>
{% endif %}
<p class="post-meta">{{ talk.date }}</p>
<div class="post-entry">
<p><strong>Abstract:</strong>
{{ talk.abstract | markdownify | remove: '<p>' | remove: '</p>' }}</p>
</div>
<div class="row post-bio">
{% if talk.biography %}
<div class="col-12 col-sm-4 col-md-3 col-lg-2 col-xl-2 text-center">
{% if talk.photo %}
<img src="{{ site.baseurl }}/assets/speakers/{{ talk.photo }}.jpg" class="img-responsive img-circle avatar" alt="">
{% else %}
<div class="avatar" style="background: #ddd;">
<i class="fa fa-user" style="font-size: 100px; color: #eee; margin-top:20px;"></i>
</div>
{% endif %}
</div>
<div class="col-12 col-sm-8 col-md-9 col-lg-10 col-xl-10 text-muted">
<p><strong>About the presenter:</strong>
{{ talk.biography | markdownify | remove: '<p>' | remove: '</p>' }}</p>
</div>
{% endif %}
</div>
</article>
{% endfor %}
</div>
<div class="posts-list" id="past-talks">
</div>
</div>
</div>
</div>
<script src="{{ site.baseurl }}/assets/vendor/jquery/jquery.min.js"></script>
<script>
$(document).ready(function() {
// Move talk to Past talks one hour after the scheduled time
var currentTime = Math.floor(Date.now() / 1000)+2*3600;
console.log('Current unix time: '+currentTime);
$("#talk-list").prepend("<h2>Upcoming talks</h2>");
// Make sure the talk list is sorted (next talk first)
$("#talk-list article")
.sort((a,b) => $(a).attr("datetime") - $(b).attr("datetime"))
.appendTo("#talk-talks");
// Add label if there are past talks
if (parseInt($("#talk-list article").first().attr("datetime")) < currentTime) {
$("#past-talks").prepend("<br /><hr><br /><h2>Past talks</h2>");
}
// Move past talks to Past Talks list
$("#talk-list article").filter(function() {
return parseInt($(this).attr("datetime")) < currentTime;
}).appendTo("#past-talks");
// Sort past talks by reverse time (most recent first)
$("#past-talks article")
.sort((a,b) => $(b).attr("datetime") - $(a).attr("datetime"))
.appendTo("#past-talks");
});
</script>