mirror of
https://github.com/vinta/awesome-python.git
synced 2026-11-08 02:15:12 -06:00
The "Browse by category" markup was duplicated in index.html and category.html, and the two copies had drifted. Co-Authored-By: Claude <noreply@anthropic.com>
23 lines
849 B
HTML
23 lines
849 B
HTML
<nav class="hero-category-nav" aria-labelledby="hero-category-heading">
|
|
<details class="hero-category-details" open>
|
|
<summary class="hero-category-meta">
|
|
<h2 id="hero-category-heading">Browse by category</h2>
|
|
</summary>
|
|
<ul class="hero-category-links">
|
|
{% for category in nav_categories %}
|
|
<li>
|
|
<a class="hero-category-link" href="{{ category_urls[category.name] }}"
|
|
>{{ category.name }}</a
|
|
>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</details>
|
|
<script>
|
|
// Collapse before first paint on phones, where the open list pushes the table about 1.5 screens down
|
|
if (matchMedia("(max-width: 680px)").matches) {
|
|
document.currentScript.previousElementSibling.open = false;
|
|
}
|
|
</script>
|
|
</nav>
|