toc_recursive_main.html 989 B

12345678910111213141516171819202122232425262728
  1. <ul class="site-toc">
  2. {% for entry in include.entries %}
  3. <li>
  4. {% if entry.children %}
  5. <span class="toc-section-heading">
  6. {{ entry.name }}
  7. </span>
  8. {% else %}
  9. <a class="{% if include.my_entry == entry.url %}this-page{% endif %}" href="{{ include.path_to_root }}{{ entry.url }}">
  10. {{ entry.name }}
  11. </a>
  12. {% if include.my_entry == entry.url %}
  13. <span class="entry-highlight"></span>
  14. {% endif %}
  15. {% endif %}
  16. {% comment %}
  17. Insert page-specific ToC here if this is the entry for this page
  18. {% endcomment %}
  19. {% if include.my_entry == entry.url %}<div id="page-toc" class="page-toc"></div>{% endif %}
  20. {% if entry.children %}
  21. {% include toc_recursive_main.html entries=entry.children my_entry=include.my_entry path_to_root=include.path_to_root %}
  22. {% endif %}
  23. </li>
  24. {% endfor %}
  25. </ul>