From 7516a5c4f667c45a73687419eac4458766ac66d7 Mon Sep 17 00:00:00 2001 From: Vinta Chen Date: Wed, 21 Oct 2026 20:03:15 +0800 Subject: [PATCH] fix: keep each hero stat on one line and read "Updated on" On phones the ISO date in the hero stat broke at its hyphen. Co-Authored-By: Claude --- website/build.py | 2 +- website/static/style.css | 5 +++++ website/templates/index.html | 2 +- website/templates/sponsorship.html | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/website/build.py b/website/build.py index ee1c9650..9ab5e472 100755 --- a/website/build.py +++ b/website/build.py @@ -937,7 +937,7 @@ def build(repo_root: Path) -> None: hero_stats: list[str] = [] if repo_stars: hero_stats.append(f"{repo_stars}+ stars on GitHub") - hero_stats.append(f"Updated {build_date.date().isoformat()}") + hero_stats.append(f"Updated on {build_date.date().isoformat()}") (sponsorship_dir / "index.html").write_text( tpl_sponsorship.render( hero_stats=hero_stats, diff --git a/website/static/style.css b/website/static/style.css index c7996a32..1c393eda 100644 --- a/website/static/style.css +++ b/website/static/style.css @@ -326,6 +326,11 @@ kbd { letter-spacing: 0.02em; } +/* Keeps a stat whole, so the date never breaks at its hyphens */ +.proof-stat { + white-space: nowrap; +} + .hero-proof a { color: var(--hero-text); text-decoration: underline; diff --git a/website/templates/index.html b/website/templates/index.html index ed141bad..e31a7076 100644 --- a/website/templates/index.html +++ b/website/templates/index.html @@ -27,7 +27,7 @@

Awesome Python

{{ subtitle }}

- {% if repo_stars %}{{ repo_stars }}+ stars on GitHub{% endif %} {% if repo_stars and build_date %}/{% endif %} {% if build_date %}Updated {{ build_date }}{% endif %} {% if repo_stars or + {% if repo_stars %}{{ repo_stars }}+ stars on GitHub{% endif %} {% if repo_stars and build_date %}/{% endif %} {% if build_date %}Updated on {{ build_date }}{% endif %} {% if repo_stars or build_date %}/{% endif %} Maintained by @vinta and diff --git a/website/templates/sponsorship.html b/website/templates/sponsorship.html index 3442a150..9b344e97 100644 --- a/website/templates/sponsorship.html +++ b/website/templates/sponsorship.html @@ -37,7 +37,7 @@ {% if hero_stats %}

- {% for stat in hero_stats %}{{ stat }}{% if not loop.last %} + {% for stat in hero_stats %}{{ stat }}{% if not loop.last %} / {% endif %}{% endfor %}

{% endif %}