feat(website): add Browse by category nav to group page hero

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-05-03 09:08:37 +08:00
parent b82a254a09
commit 64781112d8
2 changed files with 18 additions and 0 deletions
+1
View File
@@ -406,6 +406,7 @@ def build(repo_root: Path) -> None:
category_urls=category_urls,
current_path=group_path(group["slug"]),
filter_urls_json=filter_urls_json,
group_categories=group["categories"],
),
encoding="utf-8",
)
+17
View File
@@ -34,6 +34,23 @@
<p class="category-subtitle">{{ category.description_html | safe }}</p>
{% endif %}
</div>
{% if group_categories %}
<nav class="hero-category-nav" aria-labelledby="hero-category-heading">
<div class="hero-category-meta">
<h2 id="hero-category-heading">Browse by category</h2>
</div>
<ul class="hero-category-links">
{% for sub in group_categories %}
<li>
<a class="hero-category-link" href="{{ category_urls[sub.name] }}"
>{{ sub.name }}</a
>
</li>
{% endfor %}
</ul>
</nav>
{% endif %}
</div>
</header>
{% endblock %}