Version 1.0.2

This commit is contained in:
pmoreno.rodriguez 2022-10-31 11:42:24 +01:00 committed by GitHub
parent 6951a3bb6e
commit b16252bf37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,6 @@
{% block menu_navigation %} {% block menu_navigation %}
{% macro loop(page) %} {% macro loop(page) %}
{% for p in page.children %} {% for p in page.children.visible %}
{% if p.visible %}
{% set current_page = (p.active or p.activeChild) ? 'active' : '' %} {% set current_page = (p.active or p.activeChild) ? 'active' : '' %}
<li class="{{ current_page }}"> <li class="{{ current_page }}">
{% if p.routable == false and p.children.count > 0%} {% if p.routable == false and p.children.count > 0%}
@ -13,14 +12,6 @@
<ul class="subitem_hide"> <ul class="subitem_hide">
{{ _self.loop(p) }} {{ _self.loop(p) }}
</ul> </ul>
{% elseif p.routable != false and p.children.count > 0 %}
<a>
{% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
<span>{{ p.menu }}</span>
</a>
<ul class="subitem">
{{ _self.loop(p) }}
</ul>
{% else %} {% else %}
<a href="{{ p.url }}"> <a href="{{ p.url }}">
{% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %} {% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
@ -28,35 +19,10 @@
</a> </a>
{% endif %} {% endif %}
</li> </li>
{% endif %}
{% endfor %} {% endfor %}
{% endmacro %} {% endmacro %}
<ul class="menulink"> <ul class="menulink">
{% if theme_config.dropdown.enabled %}
{{ _self.loop(pages) }} {{ _self.loop(pages) }}
{% else %}
{% for p in pages.children.visible %}
{% set current_page = (p.active or p.activeChild) ? 'active' : '' %}
<li class="{{ current_page }}">
{% if p.routable == false and p.children.count > 0%}
<a>
{% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
<span>{{ p.menu }}</span>
</a>
{% elseif p.routable != false and p.children.count > 0 %}
<a>
{% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
<span>{{ p.menu }}</span>
</a>
{% else %}
<a href="{{ p.url }}">
{% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
<span>{{ p.menu }}</span>
</a>
{% endif %}
</li>
{% endfor %}
{% endif %}
{% for mitem in site.menu %} {% for mitem in site.menu %}
<li> <li>
<a href="{{ mitem.url }}"> <a href="{{ mitem.url }}">
@ -66,4 +32,4 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endblock %} {% endblock %}