{% macro render(nav_item, path, level) %} {% set class = "md-nav__item" %} {% if nav_item.active %} {% set class = class ~ " md-nav__item--active" %} {% endif %} {% if nav_item.children %} {% if "navigation.sections" in features and level == 1 + ( "navigation.tabs" in features ) %} {% set class = class ~ " md-nav__item--section" %} {% endif %}
  • {% set checked = "checked" if nav_item.active %} {% if "navigation.expand" in features and not checked %} {% else %} {% endif %}
  • {% elif nav_item == page %}
  • {% set toc = page.toc %} {% set first = toc | first %} {% if first and first.level == 1 %} {% set toc = first.children %} {% endif %} {% if toc %} {% endif %} {{ nav_item.title }} {% if toc %} {% include "partials/toc.html" %} {% endif %}
  • {% else %}
  • {{ nav_item.title }}
  • {% endif %} {% endmacro %} {{ render(nav_item, path, level) }}