mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Formatting
This commit is contained in:
parent
81a13f6bc6
commit
ebd8839a03
@ -2,7 +2,7 @@
|
||||
This file was automatically generated - do not edit
|
||||
-#}
|
||||
{% set features = config.theme.features or [] %}
|
||||
{% macro do_nav_item(nav_item, path, level) %}
|
||||
{% macro render_nav_item(nav_item, path, level) %}
|
||||
{% set class = "md-nav__item" %}
|
||||
{% if nav_item.active %}
|
||||
{% set class = class ~ " md-nav__item--active" %}
|
||||
@ -32,7 +32,11 @@
|
||||
<ul class="md-nav__list" data-md-scrollfix>
|
||||
{% set base = path %}
|
||||
{% for nav_item in nav_item.children %}
|
||||
{{ do_nav_item(nav_item, path = base ~ "-" ~ loop.index, level = level + 1) }}
|
||||
{{ render_nav_item(
|
||||
nav_item,
|
||||
path = base ~ "-" ~ loop.index,
|
||||
level = level + 1)
|
||||
}}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
@ -65,4 +69,4 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{{ do_nav_item(nav_item, path, level) }}
|
||||
{{ render_nav_item(nav_item, path, level) }}
|
||||
|
@ -23,8 +23,8 @@
|
||||
<!-- Retrieve features from configuration -->
|
||||
{% set features = config.theme.features or [] %}
|
||||
|
||||
<!-- Wrap everything into a macro to reduce file roundtrips -->
|
||||
{% macro do_nav_item(nav_item, path, level) %}
|
||||
<!-- Wrap everything into a macro to reduce file roundtrips (see #2213) -->
|
||||
{% macro render_nav_item(nav_item, path, level) %}
|
||||
|
||||
<!-- Determine class according to state -->
|
||||
{% set class = "md-nav__item" %}
|
||||
@ -85,7 +85,11 @@
|
||||
<!-- Render nested item list -->
|
||||
{% set base = path %}
|
||||
{% for nav_item in nav_item.children %}
|
||||
{{ do_nav_item(nav_item, path = base ~ "-" ~ loop.index, level = level + 1) }}
|
||||
{{ render_nav_item(
|
||||
nav_item,
|
||||
path = base ~ "-" ~ loop.index,
|
||||
level = level + 1)
|
||||
}}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
@ -137,7 +141,6 @@
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
{{ do_nav_item(nav_item, path, level) }}
|
||||
{{ render_nav_item(nav_item, path, level) }}
|
||||
|
Loading…
Reference in New Issue
Block a user