Browse Source

update html render

develop
Simon Vieille 7 days ago
parent
commit
26e39a4e35
  1. 44
      templates/module/_navigation.html.twig

44
templates/module/_navigation.html.twig

@ -12,43 +12,43 @@
{% if menu %}
<nav class="navigation">
<ul>
{% for item in menu.rootNode.children %}
{% if item.isVisible %}
{%- for item in menu.rootNode.children -%}
{%- if item.isVisible -%}
<li>
{% set icon %}
{% if item.attributes.icon is defined %}
{%- 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 %}
{%- elseif item.attributes.svg is defined -%}
<span class="deblan-icon-svg">
{{ item.attributes.svg.value|raw }}
{{- item.attributes.svg.value|raw -}}
</span>
{% endif %}
{% endset %}
{%- endif -%}
{%- endset -%}
<a href="{{ safe_node_url(item) }}" {% if _store.isActiveNode(item, true) %}class="active"{% endif %} {% if item.hasExternalUrl %}target="_blank"{% endif %}>
{{- icon|raw -}}
{{- item.label -}}
</a>
</li>
{% endif %}
{% endfor %}
{%- endif -%}
{%- endfor -%}
</ul>
</nav>
{% endif %}
{% if network %}
{%- if network -%}
<ul class="links">
{% for item in network.rootNode.children %}
{% if item.isVisible %}
{%- 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 %}
{% endfor %}
{%- endif -%}
{%- endfor -%}
</ul>
{% endif %}
{%- endif -%}
</div>
</div>
<div class="small-menu hidden-large hidden-medium visible-small">
@ -59,23 +59,23 @@
<nav class="navigation push-right">
{% if menu %}
<ul class="list--inline">
{% for item in menu.rootNode.children %}
{%- for item in menu.rootNode.children -%}
<li>
<a href="{{ safe_node_url(item) }}">
{% set icon %}
{% if item.attributes.icon is defined %}
{%- 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">
{{ item.attributes.svg.value|raw }}
</span>
{% endif %}
{% endset %}
{%- endif -%}
{%- endset -%}
{{- icon|raw -}}
</a>
</li>
{% endfor %}
{%- endfor -%}
</ul>
{% endif %}
</nav>

Loading…
Cancel
Save