-
Notifications
You must be signed in to change notification settings - Fork 10
/
pubs.html
76 lines (69 loc) · 2.33 KB
/
pubs.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
---
layout: base
style: /assets/css/pubs.css
permalink: /pubs/
title: "PUBLICATIONS |"
---
<!-- Get variables -->
{% assign publications = site.data.publications.publications %}
{% assign years = "" | split: "" %}
{% for post in publications %}
{% assign years = years | push: post.year %}
{% endfor %}
{% assign years = years | uniq | reversed %}
<div class="row">
<div class="col-10">
{% for year in years %}
<!-- Year headings -->
<div class="row text-center">
<h2><a id="{{ year }}">{{ year }}</a></h2>
</div>
<!-- Publications by year -->
{% assign year_pubs = "" | split: "" %}
{% for post in publications %}
{% if post.year == year %}
{% assign year_pubs = year_pubs | push: post %}
{% endif %}
{% endfor %}
<table align=""center">
{% tablerow post in year_pubs cols: 1 %}
<div class="paper-item">
<div class="d-flex">
<div class="flex-grow-1 ms-3">
<a class="pub-link" href="https://doi.org/{{ post.doi }}" target="_blank"
>{{ post.title }}</a
>
<p class="info">
{% assign authors = post.authors | split: "," %} {% assign dates =
post.year | append: "-" | append: post.month | append: "-" | append:
post.day %} {% if authors.size > 5 %} {{ authors[0] | append: "," |
append: authors[1] | append: "," | append: authors[2] | append: "," |
replace: "[", "" | replace: "'", "" | replace: "]", "" }}
<em>et al.</em>
{% else %} {% for author in authors %} {{ author | replace: "[", "" |
replace: "'", "" | replace: "]", "" }} {% if author != authors.last %},
{% endif %} {% endfor %} {% endif %}
<em>({{ dates | date: "%b %Y" }})</em>
</p>
</div>
<br />
</div>
</div>
{% endtablerow %}
</table>
{% if year != years.last %}
<hr>
{% endif %}
{% endfor %}
</div>
<div class="col-2">
<div class="sticky-top">
<h2>Year</h2>
<ul>
{% for year in years %}
<li><a href=#{{ year }}>{{ year }}</a></li>
{% endfor %}
</ul>
</div>
</div>
</div>