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
|
This file was automatically generated - do not edit
|
||||||
-#}
|
-#}
|
||||||
{% set features = config.theme.features or [] %}
|
{% 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" %}
|
{% set class = "md-nav__item" %}
|
||||||
{% if nav_item.active %}
|
{% if nav_item.active %}
|
||||||
{% set class = class ~ " md-nav__item--active" %}
|
{% set class = class ~ " md-nav__item--active" %}
|
||||||
@ -32,7 +32,11 @@
|
|||||||
<ul class="md-nav__list" data-md-scrollfix>
|
<ul class="md-nav__list" data-md-scrollfix>
|
||||||
{% set base = path %}
|
{% set base = path %}
|
||||||
{% for nav_item in nav_item.children %}
|
{% 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 %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
@ -65,4 +69,4 @@
|
|||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
{{ do_nav_item(nav_item, path, level) }}
|
{{ render_nav_item(nav_item, path, level) }}
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
<!-- Retrieve features from configuration -->
|
<!-- Retrieve features from configuration -->
|
||||||
{% set features = config.theme.features or [] %}
|
{% set features = config.theme.features or [] %}
|
||||||
|
|
||||||
<!-- Wrap everything into a macro to reduce file roundtrips -->
|
<!-- Wrap everything into a macro to reduce file roundtrips (see #2213) -->
|
||||||
{% macro do_nav_item(nav_item, path, level) %}
|
{% macro render_nav_item(nav_item, path, level) %}
|
||||||
|
|
||||||
<!-- Determine class according to state -->
|
<!-- Determine class according to state -->
|
||||||
{% set class = "md-nav__item" %}
|
{% set class = "md-nav__item" %}
|
||||||
@ -85,7 +85,11 @@
|
|||||||
<!-- Render nested item list -->
|
<!-- Render nested item list -->
|
||||||
{% set base = path %}
|
{% set base = path %}
|
||||||
{% for nav_item in nav_item.children %}
|
{% 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 %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
@ -137,7 +141,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{{ do_nav_item(nav_item, path, level) }}
|
{{ render_nav_item(nav_item, path, level) }}
|
||||||
|
Loading…
Reference in New Issue
Block a user