bulma/docs/_includes/components/links.html
2018-04-10 22:38:00 +01:00

35 lines
1.1 KiB
HTML

<nav class="bd-links">
{% if include.category_id %}
{% assign category_id = include.category_id %}
{% assign category_links = site.data.links.categories[category_id] %}
{% else %}
{% assign category_links = site.data.links.categories %}
{% endif %}
{% for link_id in category_links %}
{% if include.category_id %}
{% assign link = site.data.links.by_id[link_id] %}
{% else %}
{% assign thingy = link_id[0] %}
{% assign link = site.data.links.by_id[thingy] %}
{% endif %}
<a class="bd-link" href="{{ site.url }}{{ link.path }}">
<h2 class="bd-link-name">
<figure class="bd-link-figure">
{% if include.icons %}
<span class="bd-link-icon has-text-{{ link.color }}">
<i class="{% if link.icon_brand %}fab{% elsif link.icon_regular %}far{% else %}fas{% endif %} fa-{{ link.icon }}"></i>
</span>
{% else %}
<span class="bd-link-counter"></span>
{% endif %}
</figure>
{{ link.name }}
</h2>
<p class="bd-link-subtitle">
{{ link.subtitle }}
</p>
</a>
{% endfor %}
</nav>