mirror of
https://github.com/vinta/awesome-python.git
synced 2026-11-08 02:15:12 -06:00
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:
+1
-1
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user