Skip to content
Snippets Groups Projects
Commit 0c2d0e80 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Invert the paper counter and list the total at the top

parent f53b62c8
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,8 @@ for paper in paper_list:
paper.title = paper.title[0]
# Create a dictionary of cards
my_list = dict({"cards": paper_list})
my_list = dict({"num_papers": query_data.num_found,
"cards": paper_list})
# Silence the yaml object naming
def noop(self, *args, **kw):
......
......@@ -9,19 +9,24 @@
<div class="container">
{{ helper.navbar(navbar, link) }}
<div class="text">
<h2>Publications using SWIFT</h2>
</div>
<br/>
<div class="text">
<h2>Publications using SWIFT</h2>
</div>
<div> The following {{ num_papers }} have made use of SWIFT for their results:</div>
{% set count = num_papers %}
{% for card in cards|sort_cards %}
<div class="card-text">
<h4>{{ loop.index }}) <a href="https://ui.adsabs.harvard.edu/abs/{{ card.bibcode }}/abstract">{{ card.title }}</h4></a>
{% if card.author_count > 1 %}
<p>{{ card.first_author_norm }} et al., {{ card.year }}</p>
{% else %}
<p>{{ card.first_author_norm }}, {{ card.year }}</p>
{% endif %}
</div>
{% endfor %}
<div class="card-text">
<h4>{{ count + 1 - loop.index }}) <a href="https://ui.adsabs.harvard.edu/abs/{{ card.bibcode }}/abstract">{{ card.title }}</h4></a>
{% if card.author_count > 1 %}
<p>{{ card.first_author_norm }} et al., {{ card.year }}</p>
{% else %}
<p>{{ card.first_author_norm }}, {{ card.year }}</p>
{% endif %}
</div>
{% endfor %}
</div>
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment