mirror of
https://github.com/vinta/awesome-python.git
synced 2026-05-06 06:06:45 -04:00
feat(website): add Browse by category nav to group page hero
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -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",
|
||||
)
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user