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
7d5a463c60
commit
dd3a4788cb
@ -1,7 +1,7 @@
|
||||
{#-
|
||||
This file was automatically generated - do not edit
|
||||
-#}
|
||||
{% macro render_nav_item(nav_item, path, level) %}
|
||||
{% macro render(nav_item, path, level) %}
|
||||
{% set class = "md-nav__item" %}
|
||||
{% if nav_item.active %}
|
||||
{% set class = class ~ " md-nav__item--active" %}
|
||||
@ -29,13 +29,8 @@
|
||||
{{ nav_item.title }}
|
||||
</label>
|
||||
<ul class="md-nav__list" data-md-scrollfix>
|
||||
{% set base = path %}
|
||||
{% for nav_item in nav_item.children %}
|
||||
{{ render_nav_item(
|
||||
nav_item,
|
||||
path = base ~ "_" ~ loop.index,
|
||||
level = level + 1)
|
||||
}}
|
||||
{{ render(nav_item, path ~ "_" ~ loop.index, level + 1) }}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
@ -68,4 +63,4 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{{ render_nav_item(nav_item, path, level) }}
|
||||
{{ render(nav_item, path, level) }}
|
||||
|
@ -20,8 +20,8 @@
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Wrap everything into a macro to reduce file roundtrips (see #2213) -->
|
||||
{% macro render_nav_item(nav_item, path, level) %}
|
||||
<!-- Wrap everything with a macro to reduce file roundtrips (see #2213) -->
|
||||
{% macro render(nav_item, path, level) %}
|
||||
|
||||
<!-- Determine class according to state -->
|
||||
{% set class = "md-nav__item" %}
|
||||
@ -80,13 +80,8 @@
|
||||
<ul class="md-nav__list" data-md-scrollfix>
|
||||
|
||||
<!-- Render nested item list -->
|
||||
{% set base = path %}
|
||||
{% for nav_item in nav_item.children %}
|
||||
{{ render_nav_item(
|
||||
nav_item,
|
||||
path = base ~ "_" ~ loop.index,
|
||||
level = level + 1)
|
||||
}}
|
||||
{{ render(nav_item, path ~ "_" ~ loop.index, level + 1) }}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
@ -141,4 +136,4 @@
|
||||
{% endmacro %}
|
||||
|
||||
<!-- Render current and nested navigation items -->
|
||||
{{ render_nav_item(nav_item, path, level) }}
|
||||
{{ render(nav_item, path, level) }}
|
||||
|
Loading…
Reference in New Issue
Block a user