feat: show "Not on PyPI" badge for missing download counts

Replaces the em dash in the PyPI Downloads column with a source-badge
pill labeled "Not on PyPI", reusing the existing badge style used by
the stars column for visual consistency. Sorting is unaffected since
non-numeric cells already parse as missing.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vinta Chen 2026-08-16 19:20:55 +08:00
parent f5f7a1c50c
commit bfdd087282
No known key found for this signature in database
GPG key ID: B93DE4F003C33630
2 changed files with 8 additions and 2 deletions

View file

@ -155,7 +155,10 @@
</td>
<td class="col-downloads">
{% if entry.downloads is not none %}{{
"{:,}".format(entry.downloads) }}{% else %}&mdash;{% endif %}
"{:,}".format(entry.downloads) }}{% else %}<span
class="source-badge"
>Not on PyPI</span
>{% endif %}
</td>
<td class="col-stars">
{% if entry.stars is not none %}{{ "{:,}".format(entry.stars) }}{%

View file

@ -206,7 +206,10 @@
</td>
<td class="col-downloads">
{% if entry.downloads is not none %}{{
"{:,}".format(entry.downloads) }}{% else %}&mdash;{% endif %}
"{:,}".format(entry.downloads) }}{% else %}<span
class="source-badge"
>Not on PyPI</span
>{% endif %}
</td>
<td class="col-stars">
{% if entry.stars is not none %}{{ "{:,}".format(entry.stars) }}{%