mirror of
https://github.com/jgthms/bulma.git
synced 2024-11-14 11:14:24 +00:00
32 lines
1.1 KiB
HTML
32 lines
1.1 KiB
HTML
<nav id="categories" class="bd-categories">
|
|
{% for category in site.data.links.categories %}
|
|
{% assign category_id = category[0] %}
|
|
{% assign category_links = category[1] %}
|
|
{% assign category_link = site.data.links.by_id[category_id] %}
|
|
|
|
<div class="bd-category {% if category_id == current_category %}is-active{% endif %}">
|
|
<header class="bd-category-header">
|
|
<a class="bd-category-toggle">
|
|
<span class="icon">
|
|
<i class="fas fa-chevron-down"></i>
|
|
</span>
|
|
</a>
|
|
<a class="bd-category-name {% if category_id == current_link_id %}is-active{% endif %}" href="{{ site.url }}{{ category_link.path }}">
|
|
<strong>{{ category_link.name }}</strong>
|
|
</a>
|
|
</header>
|
|
|
|
<ul class="bd-category-list">
|
|
{% for link_id in category_links %}
|
|
{% assign link = site.data.links.by_id[link_id] %}
|
|
<li {% if link_id == current_link_id %}class="is-current"{% endif %}>
|
|
<a href="{{ site.url }}{{ link.path }}">
|
|
{{ link.name }}
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endfor %}
|
|
</nav>
|