From 5f2bff284504936980ef41b343e92e27cb143b83 Mon Sep 17 00:00:00 2001 From: Vinta Chen Date: Wed, 21 Oct 2026 15:37:12 +0800 Subject: [PATCH] fix: show Downloads instead of Stars on narrow screens Below 960px the table hid the PyPI Downloads column but kept the default downloads sort, so the visible Stars column looked unsorted and the active sort header was not shown or tappable. Co-Authored-By: Claude --- website/static/style.css | 10 +++++----- website/templates/category.html | 6 +++--- website/templates/index.html | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/website/static/style.css b/website/static/style.css index 4c15ac61..bc78a581 100644 --- a/website/static/style.css +++ b/website/static/style.css @@ -1174,7 +1174,7 @@ th[data-sort].sort-asc::after { } .expand-commit, -.expand-downloads { +.expand-stars { display: none; } @@ -1732,12 +1732,12 @@ th[data-sort].sort-asc::after { } .col-commit, - .col-downloads { + .col-stars { display: none; } .expand-commit, - .expand-downloads { + .expand-stars { display: inline; } @@ -1847,8 +1847,8 @@ th[data-sort].sort-asc::after { padding-right: 0.8rem; } - .col-stars { - width: 5.4rem; + .col-downloads { + width: 7.5rem; } .col-arrow { diff --git a/website/templates/category.html b/website/templates/category.html index 6b867269..e27e5f90 100644 --- a/website/templates/category.html +++ b/website/templates/category.html @@ -197,10 +197,10 @@ >{% endif %} {% if entry.downloads is not none %}{% endif %} {% if entry.stars is not none %}/{{ - "{:,}".format(entry.downloads) }} downloads/month{% endif %} diff --git a/website/templates/index.html b/website/templates/index.html index 4b024c3c..156d5aae 100644 --- a/website/templates/index.html +++ b/website/templates/index.html @@ -257,10 +257,10 @@ >{% endif %} {% if entry.downloads is not none %}{% endif %} {% if entry.stars is not none %}/{{ - "{:,}".format(entry.downloads) }} downloads/month{% endif %}