mirror of
https://github.com/vinta/awesome-python.git
synced 2026-07-12 02:34:12 +00:00
feat(website): add Browse by category nav to group page hero
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b82a254a09
commit
64781112d8
2 changed files with 18 additions and 0 deletions
|
|
@ -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 %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue