feat(nav): refactor primary navigation to split labels + icons; remove redundant nav code

This commit is contained in:
Cory Dransfeldt 2025-04-13 16:56:47 -07:00
parent 38992d10f1
commit b6d5933433
No known key found for this signature in database
23 changed files with 319 additions and 419 deletions

View file

@ -1,8 +1,12 @@
{%- assign categoryUrl = link.permalink | downcase -%}
{%- assign isHttp = categoryUrl contains "http" -%}
{%- if categoryUrl | isLinkActive:page.url -%}
{%- capture linkClass -%}
{%- if link.section -%}button{%- endif -%}
{%- if link.icon -%}icon{%- endif -%}
{%- endcapture -%}
<span
class="active {{ link.class }}"
class="active {{ linkClass }}"
aria-current="page"
>
{%- if link.icon -%}
@ -14,7 +18,7 @@
</span>
{%- else -%}
<a
class="{% if link.icon %}{{ link.icon | downcase }} icon {% endif %}{{ link.class }}"
class="{% if link.section %}{{ link.section | downcase }} button {% endif %}{% if link.icon %}{{ link.icon | downcase }} icon {% endif %}"
href="{{ categoryUrl }}"
{% if isHttp -%} rel="me" {%- endif %}
title="{{ link.title }}"