{% macro sort_form(tab, t, options) %}
{% endmacro %} {% macro pager(tab, t) %} {% if t.pages > 1 %} {% endif %} {% endmacro %} {# hidden inputs so form actions come back to the same tab / sort / page #} {% macro state_inputs(tab, t) %} {% endmacro %}
{# ───────────── new ───────────── #}
{% set t = tabs["new"] %} {% if not t.total %}

No new papers — switch to the browse arXiv tab to import some.

{% else %} {{ sort_form("new", t, [("published", "publish date"), ("imported", "import date")]) }}
{{ state_inputs("new", t) }}
{% for p in t.rows %}
{% with paper = p, tab = "new" %} {% include "_seen_btn.html" %} {% include "_bookmark_btn.html" %} {% endwith %}

{{ p.authors[:6] | join(", ") }}{% if p.authors|length > 6 %}, et al.{% endif %}

{{ p.categories | join(" · ") }}{{ p.published_at.strftime("%d %b %Y") }}

{{ p.abstract | latex }}

{% endfor %}
{{ pager("new", t) }} {% endif %}
{# ───────────── ranked ───────────── #}
{% set t = tabs["ranked"] %} {% if not t.total %}

No ranked papers yet. Pick new papers and click "rank selected".

{% else %} {{ sort_form("ranked", t, [("score", "relevance"), ("date", "ranking date"), ("published", "publish date")]) }}
{{ state_inputs("ranked", t) }}
{% for score, paper in t.rows %}
{% with tab = "ranked" %} {% include "_seen_btn.html" %} {% include "_bookmark_btn.html" %} {% endwith %}
{{ score.score | round | int }}
{% for n in range(11) %}

{{ paper.authors[:6] | join(", ") }}{% if paper.authors|length > 6 %}, et al.{% endif %}

{{ paper.categories | join(" · ") }}{{ paper.published_at.strftime("%d %b %Y") }}

{{ paper.abstract | latex }}

{{ score.reason }}

ranked {{ score.updated_at | timeago }}
{% endfor %} {{ pager("ranked", t) }} {% endif %}
{# ───────────── bookmarked ───────────── #}
{% set t = tabs["bookmarked"] %} {% if not t.total %}

No bookmarks yet — tap the bookmark on any paper to save it here.

{% else %} {{ sort_form("bookmarked", t, [("added", "bookmark date"), ("published", "publish date"), ("score", "relevance")]) }} {% for paper in t.rows %} {% set s = scores.get(paper.id) %} {% set voted = paper.id in votes %}
{% with tab = "bookmarked" %} {% include "_seen_btn.html" %} {% include "_bookmark_btn.html" %} {% endwith %} {% if s or voted %}
{% if s %}
{{ s.score | round | int }}
{% endif %} {% if voted %}
{{ votes[paper.id] }}
{% endif %}
{% endif %}
{{ paper.title | latex }}

{{ paper.authors[:6] | join(", ") }}{% if paper.authors|length > 6 %}, et al.{% endif %}

{{ paper.categories | join(" · ") }}{{ paper.published_at.strftime("%d %b %Y") }}

{{ paper.abstract | latex }}

{% if s %}

{{ s.reason }}

{% endif %}
{% endfor %} {{ pager("bookmarked", t) }} {% endif %}
{# ───────────── seen ───────────── #}
{% set t = tabs["seen"] %} {% if not t.total %}

Nothing marked as seen — tap the eye on any paper to move it here.

{% else %} {{ sort_form("seen", t, [("seen", "seen date"), ("published", "publish date"), ("score", "relevance")]) }} {% for paper in t.rows %} {% set s = scores.get(paper.id) %} {% set voted = paper.id in votes %}
{% with tab = "seen" %} {% include "_seen_btn.html" %} {% include "_bookmark_btn.html" %} {% endwith %} {% if s or voted %}
{% if s %}
{{ s.score | round | int }}
{% endif %} {% if voted %}
{{ votes[paper.id] }}
{% endif %}
{% endif %}
{{ paper.title | latex }}

{{ paper.authors[:6] | join(", ") }}{% if paper.authors|length > 6 %}, et al.{% endif %}

{{ paper.categories | join(" · ") }}{{ paper.published_at.strftime("%d %b %Y") }}

{{ paper.abstract | latex }}

{% if s %}

{{ s.reason }}

{% endif %}
{% endfor %} {{ pager("seen", t) }} {% endif %}