2017-02-26 15:59:54 +03:00
|
|
|
{% if nav_item.is_homepage %}
|
2017-01-28 19:56:34 +03:00
|
|
|
<li class="md-tabs__item">
|
2017-02-26 17:06:50 +03:00
|
|
|
{% if not page.ancestors | length and nav | selectattr("url", page.url) %}
|
2018-08-04 20:53:13 +03:00
|
|
|
<a href="{{ nav_item.url | url }}" title="{{ nav_item.title }}" class="md-tabs__link md-tabs__link--active">
|
2017-02-26 17:06:50 +03:00
|
|
|
{{ nav_item.title }}
|
|
|
|
</a>
|
|
|
|
{% else %}
|
2018-08-04 20:53:13 +03:00
|
|
|
<a href="{{ nav_item.url | url }}" title="{{ nav_item.title }}" class="md-tabs__link">
|
2017-02-26 17:06:50 +03:00
|
|
|
{{ nav_item.title }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2017-01-28 19:56:34 +03:00
|
|
|
</li>
|
2017-02-26 15:59:54 +03:00
|
|
|
{% elif nav_item.children and nav_item.children | length > 0 %}
|
2017-03-02 17:55:22 +03:00
|
|
|
{% set title = title | default(nav_item.title) %}
|
2018-07-29 17:55:17 +03:00
|
|
|
{% if (nav_item.children | first).children %}
|
2017-03-02 17:55:22 +03:00
|
|
|
{% set nav_item = nav_item.children | first %}
|
|
|
|
{% include "partials/tabs-item.html" %}
|
|
|
|
{% else %}
|
|
|
|
<li class="md-tabs__item">
|
|
|
|
{% if nav_item.active %}
|
2018-08-04 20:53:13 +03:00
|
|
|
<a href="{{ (nav_item.children | first).url | url }}" title="{{ title }}" class="md-tabs__link md-tabs__link--active">
|
2017-03-02 17:55:22 +03:00
|
|
|
{{ title }}
|
|
|
|
</a>
|
|
|
|
{% else %}
|
2018-08-04 20:53:13 +03:00
|
|
|
<a href="{{ (nav_item.children | first).url | url }}" title="{{ title }}" class="md-tabs__link">
|
2017-03-02 17:55:22 +03:00
|
|
|
{{ title }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
2017-01-28 19:56:34 +03:00
|
|
|
{% endif %}
|