forked from lolipopshock/avalanche
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresearch.html
104 lines (92 loc) · 3.76 KB
/
research.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
---
layout: page
title: Publication
---
<!-- Used for switching between tabs -->
<style>
.tab-pane {
display: none
}
.tab-content .is-active {
display: initial
}
</style>
<script>
window.onload = () => {
// Tabs Start
document.querySelectorAll('.tabs').forEach((tab) => {
tab.querySelectorAll('li').forEach((li) => {
li.onclick = () => {
tab.querySelector('li.is-active').classList.remove('is-active')
li.classList.add('is-active')
tab.nextElementSibling.querySelector('.tab-pane.is-active').classList.remove('is-active')
tab.nextElementSibling.querySelector('.tab-pane#' + li.firstElementChild.getAttribute('id'))
.classList.add("is-active")
}
})
})
}
</script>
<!-- The tab -->
<div class="tabs" style="margin-top: -3rem">
<ul style="margin: 0rem;">
{% for topic in site.data.settings.publication.topics %}
<li {% if topic.id == site.data.settings.publication.topics.first.id %}class="is-active" {% endif %}>
<a id="{{ topic.id }}">
<span>{{ topic.name }}</span>
</a>
</li>
{% endfor %}
</ul>
</div>
<!-- The tab content -->
<div class="tab-content">
{% for topic in site.data.settings.publication.topics %}
<div class="tab-pane {% if topic == site.data.settings.publication.topics.first %}is-active{% endif %}"
id="{{ topic.id }}">
{% if topic.id == 'all' %}
{% assign current_pubs = site.data.publications %}
{% else %}
{% assign current_pubs = site.data.publications | where: "topic", topic.id %}
{% endif %}
<!-- <p class="publication-misc">{{ topic.description }}</p> -->
{% for pub in current_pubs %}
{% if pub.img == nil %}
{% assign img_url = site.data.settings.publication.default_img %}
{% else %}
{% assign img_url = pub.img %}
{% endif %}
<div class="columns">
<div class="column is-4">
<figure class="image is-16by9"><img src="{{ img_url | absolute_url }}"></figure>
</div>
<div class="column is-8">
<div class="content">
<h3 class="publication-title">{{ pub.title }}</h3>
<p class="publication-name">{{ pub.author | markdownify | remove: '<p>' | remove: '</p>' }}</p>
<p class="publication-misc">
{{ pub.venue | markdownify | remove: '<p>' | remove: '</p>' }} {% if pub.venue != nil%}.{% endif %}
{{ pub.publisher | markdownify | remove: '<p>' | remove: '</p>' }} {% if pub.publisher != nil%}.{% endif %}
</p>
<div class="field is-grouped is-grouped-multiline">
{% for tag in site.data.settings.publication.tag_list %}
{% if pub[tag.name] != nil %}
<div class="control">
<div class="tags has-addons">
<span class="tag"><i class="{{ tag.icon}}"></i></span>
<a class="tag" href="{{pub[tag.name]}}">{{ tag.name | capitalize }}</a>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
{% if forloop.last != true %}
<div class="is-divider" style="margin-top: 0.5rem; margin-bottom: 1.5rem;"></div>
{% endif %}
{% endfor %}
</div>
{% endfor %}
</div>