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 <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-10-21 20:03:15 +08:00
co-authored by Claude
parent 7ebd061a78
commit 7516a5c4f6
4 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -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,
+5
View File
@@ -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;
+1 -1
View File
@@ -27,7 +27,7 @@
<h1>Awesome Python</h1>
<p class="hero-sub">{{ subtitle }}</p>
<p class="hero-proof">
{% 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 %}<span class="proof-stat">{{ repo_stars }}+ stars on GitHub</span>{% endif %} {% if repo_stars and build_date %}/{% endif %} {% if build_date %}<span class="proof-stat">Updated on {{ build_date }}</span>{% endif %} {% if repo_stars or
build_date %}/{% endif %} Maintained by
<a href="https://github.com/vinta" target="_blank" rel="noopener">@vinta</a>
and
+1 -1
View File
@@ -37,7 +37,7 @@
{% if hero_stats %}
<p class="hero-proof sponsorship-proof">
{% for stat in hero_stats %}{{ stat }}{% if not loop.last %}
{% for stat in hero_stats %}<span class="proof-stat">{{ stat }}</span>{% if not loop.last %}
<span class="proof-sep">/</span> {% endif %}{% endfor %}
</p>
{% endif %}