update small-menu

This commit is contained in:
Simon Vieille 2022-04-20 23:49:39 +02:00
parent 49ba75676c
commit 5b86aabc55
Signed by: deblan
GPG Key ID: 579388D585F70417
2 changed files with 24 additions and 28 deletions

0
.build
View File

View File

@ -19,25 +19,23 @@
{% if menu %}
<nav class="navigation {% if avatar %}navigation-with-avatar{% endif %}">
<ul>
{%- for item in menu.rootNode.children -%}
{%- if item.isVisible -%}
<li>
{%- set icon -%}
{%- if item.attributes.icon is defined -%}
<span class="deblan-icon deblan-icon-{{ item.attributes.icon.value }}"></span>
{%- elseif item.attributes.svg is defined -%}
<span class="deblan-icon-svg">
{{- item.attributes.svg.value|raw -}}
</span>
{%- endif -%}
{%- endset -%}
{%- for item in menu.rootNode.children({isVisible: true}) -%}
<li>
{%- set icon -%}
{%- if item.attributes.icon is defined -%}
<span class="deblan-icon deblan-icon-{{ item.attributes.icon.value }}"></span>
{%- elseif item.attributes.svg is defined -%}
<span class="deblan-icon-svg">
{{- item.attributes.svg.value|raw -}}
</span>
{%- endif -%}
{%- endset -%}
<a href="{{ safe_node_url(item, {_domain: _domain}) }}" {% if _store.isActiveNode(item, true) %}class="active"{% endif %} {% if item.hasExternalUrl %}target="_blank"{% endif %}>
{{- icon|raw -}}
{{- item.label -}}
</a>
</li>
{%- endif -%}
<a href="{{ safe_node_url(item, {_domain: _domain}) }}" {% if _store.isActiveNode(item, true) %}class="active"{% endif %} {% if item.hasExternalUrl %}target="_blank"{% endif %}>
{{- icon|raw -}}
{{- item.label -}}
</a>
</li>
{%- endfor -%}
</ul>
</nav>
@ -45,14 +43,12 @@
{%- if network -%}
<ul class="links">
{%- for item in network.rootNode.children -%}
{%- if item.isVisible -%}
<li class="link link-{{ item.attributes.icon.value }}">
<a href="{{ safe_node_url(item) }}" class="deblan-icon deblan-icon-{{ item.attributes.icon.value }}" target="_blank">
<span>{{- item.label -}}</span>
</a>
</li>
{%- endif -%}
{%- for item in network.rootNode.children({isVisible: true}) -%}
<li class="link link-{{ item.attributes.icon.value }}">
<a href="{{ safe_node_url(item) }}" class="deblan-icon deblan-icon-{{ item.attributes.icon.value }}" target="_blank">
<span>{{- item.label -}}</span>
</a>
</li>
{%- endfor -%}
</ul>
{%- endif -%}
@ -66,9 +62,9 @@
<nav class="navigation">
{% if menu %}
<ul>
{%- for item in menu.rootNode.children -%}
{%- for item in menu.rootNode.children({isVisible: true}) -%}
<li>
<a href="{{ safe_node_url(item, {_domain: _domain}) }}">
<a href="{{ safe_node_url(item, {_domain: _domain}) }}" {% if _store.isActiveNode(item, true) %}class="active"{% endif %} {% if item.hasExternalUrl %}target="_blank"{% endif %}>
{%- set icon -%}
{%- if item.attributes.icon is defined -%}
<span class="deblan-icon deblan-icon-{{ item.attributes.icon.value }}"></span>