This repository has been archived on 2025-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
coryd.dev-eleventy/src/_includes/partials/nav/link.liquid
2024-04-28 19:06:48 -07:00

21 lines
No EOL
577 B
Text

{%- capture categoryUrl %}/{{ link | downcase }}/{% endcapture -%}
{% if categoryUrl | isLinkActive: page.url %}
<span class="active {{ class }}" aria-current="page">
{% if icon %}
{% tablericon icon link %}
{% else %}
{{ link }}
{% endif %}
</span>
{% else %}
{% if icon %}
<a class="{{ icon | downcase }} icon {{ class }}" href="/{{ link | downcase }}">
{% tablericon icon link %}
<span>{{ link }}</span>
</a>
{% else %}
<a class="icon" href="/{{ link | downcase }}">
{{ link }}
</a>
{% endif %}
{% endif %}