mirror of
https://github.com/avitex/avitex.github.io
synced 2024-11-16 09:29:57 +00:00
28 lines
1.2 KiB
HTML
28 lines
1.2 KiB
HTML
<nav class="site-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
|
|
<ul class="menu main-menu">
|
|
{% 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>
|
|
<ul class="menu sub-menu">
|
|
{% for item in config.extra.main_menu %}
|
|
{% if item.sub and current_url is starting_with(macros::link(url=item.url)) %}
|
|
{% for sub_item in item.sub %}
|
|
<li>
|
|
<a itemprop="url"
|
|
class="{% if macros::link(url=sub_item.url) == current_url %}active{% endif %}"
|
|
href="{{ macros::link(url=sub_item.url) }}">
|
|
<span itemprop="name">{{ sub_item.name }}</span>
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</nav> |