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

20 lines
No EOL
537 B
Text

{%- capture pageUrl %}/{{ link | downcase }}/{% endcapture -%}
{% if pageUrl contains page.fileSlug and page.fileSlug %}
<span class="active {{ class }}" aria-current="page">
{% if icon %}
{% tablericon icon link %}
{% else %}
{{ link }}
{% endif %}
</span>
{% else %}
{% if icon %}
<a class="{{ icon | downcase }} {{ class }}" href="/{{ link | downcase }}">
{% tablericon icon link %}
</a>
{% else %}
<a href="/{{ link | downcase }}">
{{ link }}
</a>
{% endif %}
{% endif %}