Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
96 lines (88 loc) · 3.2 KB
/
Copy pathindex.html
File metadata and controls
96 lines (88 loc) · 3.2 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
---
layout: default
---
{% assign home = site.data.home %}
<section class="hero wrap">
<figure class="lab-photo">
<img src="{{ home.hero.image | relative_url }}" alt="{{ home.hero.caption }}">
{% if home.hero.caption %}<figcaption>{{ home.hero.caption }}</figcaption>{% endif %}
</figure>
</section>
<section class="intro wrap">
{{ home.intro | markdownify }}
</section>
<section class="wrap">
<div class="sec-head"><h2>News and Announcements</h2></div>
<ul class="news-list">
{% assign sorted_news = site.data.news.items | sort: "date" | reverse %}
{% for n in sorted_news %}
<li{% if forloop.index > home.news_count %} class="hidden-news"{% endif %}><span class="date">{{ n.date | date: "%m/%Y" }}.</span>
{{ n.details | markdownify }}</li>
{% endfor %}
</ul>
{% if sorted_news.size > home.news_count %}
<button class="news-more" onclick="document.querySelectorAll('.hidden-news').forEach(e=>e.classList.remove('hidden-news'));this.remove()">older news ▼</button>
{% endif %}
</section>
<section class="wrap">
<div class="sec-head">
<h2>Recent Papers</h2>
<a class="side" href="{{ '/publications/' | relative_url }}">all publications →</a>
</div>
<div class="pub-cards">
{% assign pub_years = site.data.publications | map: "year" | uniq | sort | reverse %}
{% assign recent = "" | split: "" %}
{% for y in pub_years %}
{% assign in_year = site.data.publications | where: "year", y %}
{% assign recent = recent | concat: in_year %}
{% endfor %}
{% for p in recent limit: home.publications_count %}
{% if p.links.first %}
<a class="pub-card" href="{{ p.links.first.url }}">
<p class="title">{{ p.title }}</p>
<p class="venue">{{ p.venue }}</p>
</a>
{% else %}
<div class="pub-card">
<p class="title">{{ p.title }}</p>
<p class="venue">{{ p.venue }}</p>
</div>
{% endif %}
{% endfor %}
</div>
</section>
<section class="wrap">
<div class="sec-head"><h2>Selected Talks</h2></div>
<div class="talk-grid">
{% for t in home.talks %}
<div class="talk">
<button class="frame" aria-label="Play: {{ t.title }}" data-yt="{{ t.youtube_id }}" onclick="playTalk(this)">
<img src="https://i.ytimg.com/vi/{{ t.youtube_id }}/hqdefault.jpg" alt="" loading="lazy">
</button>
<h3>{{ t.title }}</h3>
</div>
{% endfor %}
</div>
</section>
{% if home.sponsors and home.sponsors.size > 0 %}
<section class="wrap sponsors">
<p class="label">Current and past sponsors</p>
<div class="sponsor-row">
{% for s in home.sponsors %}
<img src="{{ s.logo | relative_url }}" alt="{{ s.name }}" title="{{ s.name }}" loading="lazy">
{% endfor %}
</div>
</section>
{% endif %}
<script>
function playTalk(btn) {
const id = btn.dataset.yt;
const f = document.createElement('iframe');
f.src = 'https://www.youtube.com/embed/' + id + '?autoplay=1';
f.allow = 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen; web-share';
f.allowFullscreen = true;
const holder = document.createElement('div'); holder.className = 'frame';
holder.appendChild(f);
btn.replaceWith(holder);
}
</script>