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
co-authored by Claude
parent f5f7a1c50c
commit bfdd087282
2 changed files with 8 additions and 2 deletions
+4 -1
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) }}{%
+4 -1
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) }}{%