diff --git a/Makefile b/Makefile index 21a4c5d2..8a0905f4 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,6 @@ build: uv run python website/build.py preview: build - @echo "Check the website on http://localhost:8000" uv run watchmedo shell-command \ --patterns='*.md;*.html;*.css;*.js;*.py' \ --recursive \ diff --git a/website/build.py b/website/build.py index f2057472..cf759283 100644 --- a/website/build.py +++ b/website/build.py @@ -126,6 +126,13 @@ def extract_entries( return entries +def format_stars_short(stars: int) -> str: + """Format star count as compact string like '230k'.""" + if stars >= 1000: + return f"{stars // 1000}k" + return str(stars) + + def build(repo_root: str) -> None: """Main build: parse README, render single-page HTML via Jinja2 templates.""" repo = Path(repo_root) @@ -146,6 +153,10 @@ def build(repo_root: str) -> None: entries = extract_entries(categories, parsed_groups) stars_data = load_stars(website / "data" / "github_stars.json") + + repo_self = stars_data.get("vinta/awesome-python", {}) + repo_stars = format_stars_short(repo_self["stars"]) if "stars" in repo_self else None + for entry in entries: repo_key = extract_github_repo(entry["url"]) if not repo_key and entry.get("source_type") == "Built-in": @@ -176,6 +187,7 @@ def build(repo_root: str) -> None: entries=entries, total_entries=total_entries, total_categories=len(categories), + repo_stars=repo_stars, build_date=datetime.now(timezone.utc).strftime("%B %d, %Y"), ), encoding="utf-8", diff --git a/website/fetch_github_stars.py b/website/fetch_github_stars.py index d3b024ed..ccff1b6d 100644 --- a/website/fetch_github_stars.py +++ b/website/fetch_github_stars.py @@ -103,6 +103,7 @@ def main() -> None: readme_text = README_PATH.read_text(encoding="utf-8") current_repos = extract_github_repos(readme_text) + current_repos.add("vinta/awesome-python") print(f"Found {len(current_repos)} GitHub repos in README.md") cache = load_stars(CACHE_FILE) diff --git a/website/static/style.css b/website/static/style.css index daf018f6..1373b1ea 100644 --- a/website/static/style.css +++ b/website/static/style.css @@ -38,7 +38,7 @@ --footer-text: oklch(72% 0.02 75); --footer-link: oklch(82% 0.02 75); --footer-link-hover: oklch(95% 0.01 80); - --footer-muted: oklch(50% 0.02 55); + --footer-sep: oklch(55% 0.02 55); } @@ -304,6 +304,13 @@ kbd { margin-top: 1.75rem; } +.hero-proof { + margin-top: 1.5rem; + color: oklch(68% 0.02 72); + font-size: var(--text-sm); + letter-spacing: 0.02em; +} + .hero-action { display: inline-flex; align-items: center; @@ -896,11 +903,6 @@ th[data-sort].sort-asc::after { color: var(--footer-link); } -.footer-date { - font-size: var(--text-xs); - color: var(--footer-muted); -} - .footer-links { display: block; text-align: right; diff --git a/website/templates/base.html b/website/templates/base.html index 5e7cea95..5c2d0938 100644 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -55,7 +55,6 @@