{% extends "base.html" %} {% macro heading_list(sections) %}
    {% for s in sections if s.level == 2 %}
  1. {{ s.title }}
  2. {% endfor %}
{% endmacro %} {% block running_head %} {% if page.part %} {{ page.part.title }} / {{ page.title }} {% elif page.kind == "part" %} {{ page.title }} {% elif page.kind == "glossary" %} {{ glossary_page.title }} {% endif %} {% endblock %} {% block contents %} {% for part in parts %}
{% if part.icon %}{{ icons[part.icon] | safe }}{% endif %} {{ part.title }} {% if part.chapters %}
    {% for chapter in part.chapters %}
  1. {{ chapter.title }} {% if chapter.section_pages and (chapter == page or chapter == page.chapter) %}
      {% for section in chapter.section_pages %}
    1. {{ section.title }} {% if section == page and page.sections %}{{ heading_list(page.sections) }}{% endif %}
    2. {% endfor %}
    {% elif chapter == page and page.sections %} {{ heading_list(page.sections) }} {% endif %}
  2. {% endfor %}
{% endif %}
{% endfor %} {% endblock %} {% block pagenav %}{% endblock %}