| {# Table of Contents partial — no inline styles, CSS-only #} | |
| <div class="toc"> | |
| <div class="toc-heading">Table of Contents</div> | |
| <table class="toc-table" cellspacing="0" cellpadding="0"> | |
| <colgroup> | |
| <col /> | |
| <col width="50" /> | |
| <col width="48" /> | |
| </colgroup> | |
| {% for e in toc_items_sorted %} | |
| {% if e.title %} | |
| <tr | |
| class="{{ 'toc-row--major' if e.level == 0 else 'toc-row--sub' }}{{ ' toc-row--deep' if e.level >= 2 else '' }}{{ ' toc-row--bold' if e.bold else '' }}{{ ' toc-row--upper' if e.upper else '' }}{{ ' toc-row--indent-1' if e.level == 1 else '' }}{{ ' toc-row--indent-2' if e.level >= 2 else '' }}"> | |
| <td class="toc-title"> | |
| {% if e.bold %}<strong>{% endif %} | |
| {% if e.target %}<a href="{{ e.target | e }}">{% endif %} | |
| {{ e.display_title | e }} | |
| {% if e.target %}</a>{% endif %} | |
| {% if e.bold %}</strong>{% endif %} | |
| </td> | |
| <td class="toc-dots"> </td> | |
| <td class="toc-pagenum"> | |
| {% if e.page %}<strong>{{ e.page | e }}</strong>{% else %} {% endif %} | |
| </td> | |
| </tr> | |
| {% endif %} | |
| {% endfor %} | |
| </table> | |
| </div> |