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 <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-10-21 15:49:36 +08:00
co-authored by Claude
parent f45997e386
commit 5f2bff2845
3 changed files with 11 additions and 11 deletions
+5 -5
View File
@@ -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 {
+3 -3
View File
@@ -197,10 +197,10 @@
><time datetime="{{ entry.last_commit_at }}"
>{{ entry.last_commit_at[:10] }}</time
></span
>{% endif %} {% if entry.downloads is not none %}<span
class="expand-downloads"
>{% endif %} {% if entry.stars is not none %}<span
class="expand-stars"
><span class="expand-sep">/</span>{{
"{:,}".format(entry.downloads) }} downloads/month</span
"{:,}".format(entry.stars) }} stars</span
>{% endif %}
</div>
</div>
+3 -3
View File
@@ -257,10 +257,10 @@
><time datetime="{{ entry.last_commit_at }}"
>{{ entry.last_commit_at[:10] }}</time
></span
>{% endif %} {% if entry.downloads is not none %}<span
class="expand-downloads"
>{% endif %} {% if entry.stars is not none %}<span
class="expand-stars"
><span class="expand-sep">/</span>{{
"{:,}".format(entry.downloads) }} downloads/month</span
"{:,}".format(entry.stars) }} stars</span
>{% endif %}
</div>
</div>