toc.html 871 B

1234567891011121314151617181920212223
  1. {% if nav_item.children %}
  2. <ul class="subnav">
  3. <li><span>{{ nav_item.title }}</span></li>
  4. {% for nav_item in nav_item.children %}
  5. {% include 'toc.html' %}
  6. {% endfor %}
  7. </ul>
  8. {% else %}
  9. <li class="toctree-l1 {% if nav_item.active%}current{%endif%}">
  10. <a class="{% if nav_item.active%}current{%endif%}" href="{{ nav_item.url }}">{{ nav_item.title }}</a>
  11. {% if nav_item == current_page %}
  12. <ul>
  13. {% for toc_item in toc %}
  14. <li class="toctree-l3"><a href="{{ toc_item.url }}">{{ toc_item.title }}</a></li>
  15. {% for toc_item in toc_item.children %}
  16. <li><a class="toctree-l4" href="{{ toc_item.url }}">{{ toc_item.title }}</a></li>
  17. {% endfor %}
  18. {% endfor %}
  19. </ul>
  20. {% endif %}
  21. </li>
  22. {% endif %}