Skip to content

Commit 59cf136

Browse files
committed
updated and cleaned up the papers logic
1 parent ef63a50 commit 59cf136

1 file changed

Lines changed: 18 additions & 43 deletions

File tree

_includes/papers.html

Lines changed: 18 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,26 @@
11
<section aria-label="Papers">
2-
{%- for paper in site.data.papers -%}
2+
{% for paper in site.data.papers %}
33
<article class="paper-item">
4-
<header>
5-
<span>
6-
·
7-
{%- assign authors_count = paper.authors | size -%}
8-
{%- if authors_count > 0 -%}
9-
{%- for author in paper.authors -%}
10-
{%- if author.highlight -%}
11-
<strong>{{ author.name }}</strong>
12-
{%- else -%}
13-
{{ author.name }}
14-
{%- endif -%}
15-
{%- unless forloop.last -%}, {%- endunless -%}
16-
{%- endfor -%}.
17-
{%- endif -%}
4+
· {% assign authors_count = paper.authors | size %}
5+
{% if authors_count > 0 %}
6+
{% for author in paper.authors %}
7+
{% if author.highlight %}<strong>{{ author.name }}</strong>{% else %}{{ author.name }}{% endif %}{% unless forloop.last %}, {% endunless %}
8+
{% endfor %}.
9+
{% endif %}
1810

19-
{%- assign title = paper.title | strip -%}
20-
{{ title }}{%- unless title | slice: -1 == '.' -%}.{%- endunless -%}
21-
<em>{{ paper.venue }}</em>, {{ paper.year }}.
22-
</span>
23-
</header>
11+
{% assign title = paper.title | strip %}
12+
{{ title }}{% unless title | slice: -1 == '.' %}.{% endunless %} <em>{{ paper.venue }}</em>, {{ paper.year }}.
2413

25-
<footer>
26-
{%- assign links_count = paper.links | size -%}
27-
{%- if links_count > 0 -%}
28-
<div>
29-
<sub>
30-
<strong>
31-
{%- for link in paper.links -%}
32-
<a href="{{ link.url }}">{{ link.label }}</a>{% unless forloop.last %} · {% endunless %}
33-
{%- endfor -%}
34-
</strong>
35-
</sub>
36-
</div>
37-
{%- endif -%}
14+
{% assign links_count = paper.links | size %}
15+
{% if links_count > 0 %} <sub><strong>
16+
{% for link in paper.links %}
17+
<a href="{{ link.url }}">{{ link.label }}</a>{% unless forloop.last %} · {% endunless %}
18+
{% endfor %}
19+
</strong></sub>{% endif %}
3820

39-
{%- if paper.doi -%}
40-
<div>
41-
<sub class="citation"{% if paper.citation_id %} id="{{ paper.citation_id }}"{% endif %} data-doi="{{ paper.doi }}"></sub>
42-
</div>
43-
{%- endif -%}
21+
{% if paper.doi %} <sub class="citation"{% if paper.citation_id %} id="{{ paper.citation_id }}"{% endif %} data-doi="{{ paper.doi }}"></sub>{% endif %}
4422

45-
<div>
46-
<sub><strong><code>{{ paper.type }}</code></strong></sub>
47-
</div>
48-
</footer>
23+
<sub><strong><code>{{ paper.type }}</code></strong></sub>
4924
</article>
50-
{%- endfor -%}
25+
{% endfor %}
5126
</section>

0 commit comments

Comments
 (0)