1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- {% macro loop(page) %}
- {% for p in page.children.visible %}
- {% set current_page = (p.active or p.activeChild) ? 'active' : '' %}
- <li class="{{ current_page }}">
- <a href="{{ p.url }}">
- {% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
- {{ p.menu }}
- </a>
- {% if p.children.visible.count > 0 %}
- <ul>
- {{ _self.loop(p) }}
- </ul>
- {% endif %}
- </li>
- {% endfor %}
- {% endmacro %}
- <ul class="navigation">
- {% if theme_config.dropdown.enabled %}
- {{ _self.loop(pages) }}
- {% else %}
- {% for page in pages.children.visible %}
- {% set current_page = (page.active or page.activeChild) ? 'active' : '' %}
- <li class="{{ current_page }}">
- <a href="{{ page.url }}">
- {% if page.header.icon %}<i class="fa fa-{{ page.header.icon }}"></i>{% endif %}
- {{ page.menu }}
- </a>
- </li>
- {% endfor %}
- {% endif %}
- {% for mitem in site.menu %}
- <li>
- <a href="{{ mitem.url }}">
- {% if mitem.icon %}<i class="fa fa-{{ mitem.icon }}"></i>{% endif %}
- {{ mitem.text }}
- </a>
- </li>
- {% endfor %}
- {% if config.plugins.login.enabled and grav.user.username %}
- <li><i class="fa fa-lock"></i> {% include 'partials/login-status.html.twig' %}</li>
- {% endif %}
- </ul>
|