Skip to content

Commit 1d6dd1c

Browse files
committed
Publications: hide pre-2010 entries behind 'Previous work by R. Das'
- Year groups for >= 2010 render inline as before. - Pre-2010 year groups (and any with year=0 from missing data) are collapsed inside a <details>/<summary>, with summary text matching the user's request: 'Previous work by R. Das'.
1 parent 2f6c01a commit 1d6dd1c

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

publications.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ permalink: /publications/
1818

1919
{% for year in years %}
2020
{% assign year_pubs = pubs | where: "year", year %}
21+
{% if year >= 2010 %}
2122
<section class="pub-year-group">
2223
<h2 class="pub-year" id="y{{ year }}">{{ year }}</h2>
2324
<div class="pub-list">
@@ -40,4 +41,36 @@ permalink: /publications/
4041
{% endfor %}
4142
</div>
4243
</section>
44+
{% endif %}
4345
{% endfor %}
46+
47+
<details class="show-more">
48+
<summary>Previous work by R. Das</summary>
49+
{% for year in years %}
50+
{% if year < 2010 and year > 0 %}
51+
{% assign year_pubs = pubs | where: "year", year %}
52+
<section class="pub-year-group">
53+
<h2 class="pub-year" id="y{{ year }}">{{ year }}</h2>
54+
<div class="pub-list">
55+
{% for pub in year_pubs %}
56+
<article class="publication{% if pub.featured %} featured{% endif %}">
57+
{% if pub.thumb %}
58+
<img class="pub-thumb" src="{{ pub.thumb | relative_url }}" alt="">
59+
{% endif %}
60+
<div class="pub-text">
61+
<p class="pub-authors">{{ pub.authors }}</p>
62+
<p class="pub-title">"{{ pub.title }}"</p>
63+
{% if pub.journal %}<p class="pub-meta"><em>{{ pub.journal }}</em></p>{% endif %}
64+
<p class="pub-links">
65+
{% if pub.pdf %}<a href="{{ pub.pdf }}" target="_blank" rel="noopener">Paper</a>{% endif %}
66+
{% if pub.doi %}<a href="{{ pub.doi }}" target="_blank" rel="noopener">Link</a>{% endif %}
67+
{% if pub.link_labels %}{% for label in pub.link_labels %}<a href="{{ pub.link_urls[forloop.index0] }}" target="_blank" rel="noopener">{{ label }}</a>{% endfor %}{% endif %}
68+
</p>
69+
</div>
70+
</article>
71+
{% endfor %}
72+
</div>
73+
</section>
74+
{% endif %}
75+
{% endfor %}
76+
</details>

0 commit comments

Comments
 (0)