feat(nav): refactor primary navigation to split labels + icons; remove redundant nav code
This commit is contained in:
parent
38992d10f1
commit
13914c29fa
18 changed files with 105 additions and 360 deletions
|
@ -14,7 +14,7 @@
|
|||
</span>
|
||||
{%- else -%}
|
||||
<a
|
||||
class="{% if link.icon %}{{ link.icon | downcase }} icon {% endif %}{{ link.class }}"
|
||||
class="{% if link.section %}{{ link.section | downcase }} {% endif %}{% if link.icon %}{{ link.icon | downcase }} icon {% endif %}{{ link.class }}"
|
||||
href="{{ categoryUrl }}"
|
||||
{% if isHttp -%} rel="me" {%- endif %}
|
||||
title="{{ link.title }}"
|
||||
|
|
11
src/includes/nav/menu.liquid
Normal file
11
src/includes/nav/menu.liquid
Normal file
|
@ -0,0 +1,11 @@
|
|||
<nav class="{{ class }}">
|
||||
{%- for link in nav -%}
|
||||
{% render "nav/link.liquid",
|
||||
page:page,
|
||||
link:link
|
||||
%}
|
||||
{%- if separator -%}
|
||||
{% unless forloop.last %}<span>•</span>{% endunless %}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
</nav>
|
|
@ -1,12 +0,0 @@
|
|||
<nav class="primary-navigation">
|
||||
<ul class="nav-list">
|
||||
{%- for link in nav.primary -%}
|
||||
<li>
|
||||
{% render "nav/link.liquid",
|
||||
page:page,
|
||||
link:link
|
||||
%}
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
</nav>
|
|
@ -1,9 +0,0 @@
|
|||
<nav aria-label="Secondary site navigation" class="sub-pages">
|
||||
{%- for link in links -%}
|
||||
{% render "nav/link.liquid",
|
||||
page:page,
|
||||
link:link
|
||||
%}
|
||||
{% unless forloop.last %}<span>•</span>{% endunless %}
|
||||
{%- endfor -%}
|
||||
</nav>
|
|
@ -1,8 +0,0 @@
|
|||
<nav aria-label="Social icons" class="social">
|
||||
{%- for link in links -%}
|
||||
{% render "nav/link.liquid",
|
||||
page:page,
|
||||
link:link
|
||||
%}
|
||||
{%- endfor -%}
|
||||
</nav>
|
Loading…
Add table
Add a link
Reference in a new issue