mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed missing link in tabs navigation on deeply nested items
This commit is contained in:
parent
009b41cdb1
commit
bbc48e75bf
@ -11,15 +11,21 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% elif nav_item.children and nav_item.children | length > 0 %}
|
{% elif nav_item.children and nav_item.children | length > 0 %}
|
||||||
<li class="md-tabs__item">
|
{% set title = title | default(nav_item.title) %}
|
||||||
{% if nav_item.active %}
|
{% if (nav_item.children | first).children | length > 0 %}
|
||||||
<a href="{{ (nav_item.children | first).url }}" title="{{ nav_item.title }}" class="md-tabs__link md-tabs__link--active">
|
{% set nav_item = nav_item.children | first %}
|
||||||
{{ nav_item.title }}
|
{% include "partials/tabs-item.html" %}
|
||||||
</a>
|
{% else %}
|
||||||
{% else %}
|
<li class="md-tabs__item">
|
||||||
<a href="{{ (nav_item.children | first).url }}" title="{{ nav_item.title }}" class="md-tabs__link">
|
{% if nav_item.active %}
|
||||||
{{ nav_item.title }}
|
<a href="{{ (nav_item.children | first).url }}" title="{{ title }}" class="md-tabs__link md-tabs__link--active">
|
||||||
</a>
|
{{ title }}
|
||||||
{% endif %}
|
</a>
|
||||||
</li>
|
{% else %}
|
||||||
|
<a href="{{ (nav_item.children | first).url }}" title="{{ title }}" class="md-tabs__link">
|
||||||
|
{{ title }}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -38,18 +38,27 @@
|
|||||||
|
|
||||||
<!-- Main navigation item with nested items -->
|
<!-- Main navigation item with nested items -->
|
||||||
{% elif nav_item.children and nav_item.children | length > 0 %}
|
{% elif nav_item.children and nav_item.children | length > 0 %}
|
||||||
<li class="md-tabs__item">
|
{% set title = title | default(nav_item.title) %}
|
||||||
{% if nav_item.active %}
|
|
||||||
<a href="{{ (nav_item.children | first).url }}"
|
<!-- Recurse, if the first item has nested items -->
|
||||||
title="{{ nav_item.title }}"
|
{% if (nav_item.children | first).children | length > 0 %}
|
||||||
class="md-tabs__link md-tabs__link--active">
|
{% set nav_item = nav_item.children | first %}
|
||||||
{{ nav_item.title }}
|
{% include "partials/tabs-item.html" %}
|
||||||
</a>
|
|
||||||
{% else %}
|
<!-- Render item -->
|
||||||
<a href="{{ (nav_item.children | first).url }}"
|
{% else %}
|
||||||
title="{{ nav_item.title }}" class="md-tabs__link">
|
<li class="md-tabs__item">
|
||||||
{{ nav_item.title }}
|
{% if nav_item.active %}
|
||||||
</a>
|
<a href="{{ (nav_item.children | first).url }}"
|
||||||
{% endif %}
|
title="{{ title }}" class="md-tabs__link md-tabs__link--active">
|
||||||
</li>
|
{{ title }}
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ (nav_item.children | first).url }}"
|
||||||
|
title="{{ title }}" class="md-tabs__link">
|
||||||
|
{{ title }}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user