| {# Table of Contents — CSS dot-leader layout (single-line per entry) #} | |
| <div class="toc"> | |
| <div class="toc-heading">CONTENTS</div> | |
| <div class="toc-list"> | |
| {% for e in toc_items_sorted %} | |
| {% if e.title %} | |
| <div | |
| class="toc-entry{{ ' toc-entry--major' if e.level == 0 else ' toc-entry--sub' }}{{ ' toc-entry--indent' if e.level >= 1 else '' }}"> | |
| <span class="toc-label">{% if e.target %}<a href="{{ e.target | e }}">{% endif %}{{ e.display_title | e }}{% | |
| if e.target %}</a>{% endif %}</span> | |
| <span class="toc-leader"></span> | |
| <span class="toc-page">{% if e.page %}{{ e.page | e }}{% endif %}</span> | |
| </div> | |
| {% endif %} | |
| {% endfor %} | |
| </div> | |
| </div> |