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:37:12 +08:00
parent f45997e386
commit 5f2bff2845
No known key found for this signature in database
GPG key ID: B93DE4F003C33630
3 changed files with 11 additions and 11 deletions

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 {

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>

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>