2020-04-11 17:22:25 +00:00
|
|
|
<nav class="site-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
|
|
|
|
<ul class="menu main-menu">
|
2020-04-14 02:23:38 +00:00
|
|
|
{% for item in config.extra.main_menu %}
|
|
|
|
<li>
|
|
|
|
<a itemprop="url"
|
|
|
|
class="{% if macros::is_active_nav(url=macros::link(url=item.url), curr_url=current_url) == "true" %}active{% endif %}"
|
|
|
|
href="{{ macros::link(url=item.url) }}">
|
|
|
|
<span itemprop="name">{{ item.name }}</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% for item in config.extra.main_menu %}
|
|
|
|
{% if item.sub and current_url is starting_with(macros::link(url=item.url)) %}
|
|
|
|
<ul class="menu sub-menu">
|
2020-04-11 17:22:25 +00:00
|
|
|
{% for sub_item in item.sub %}
|
|
|
|
<li>
|
2020-04-14 02:23:38 +00:00
|
|
|
<a
|
|
|
|
itemprop="url"
|
|
|
|
href="{{ macros::link(url=sub_item.url) }}"
|
|
|
|
{%- if macros::link(url=sub_item.url) == current_url %} class="active" {% endif -%}
|
|
|
|
>
|
2020-04-11 17:22:25 +00:00
|
|
|
<span itemprop="name">{{ sub_item.name }}</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
2020-04-14 02:23:38 +00:00
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2020-04-11 17:22:25 +00:00
|
|
|
</nav>
|