|
| 1 | +{# |
| 2 | + basic/genindex.html |
| 3 | + ~~~~~~~~~~~~~~~~~~~ |
| 4 | + |
| 5 | + Template for an "all-in-one" index. |
| 6 | + |
| 7 | + :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. |
| 8 | + :license: BSD, see LICENSE for details. |
| 9 | +#} |
| 10 | +{% macro indexentries(firstname, links) %} |
| 11 | + {%- if links -%} |
| 12 | + <a href="{{ links[0][1] }}"> |
| 13 | + {%- if links[0][0] %}<strong>{% endif -%} |
| 14 | + {{ firstname|e }} |
| 15 | + {%- if links[0][0] %}</strong>{% endif -%} |
| 16 | + </a> |
| 17 | + |
| 18 | + {%- for ismain, link in links[1:] -%} |
| 19 | + , <a href="{{ link }}">{% if ismain %}<strong>{% endif -%} |
| 20 | + [{{ loop.index }}] |
| 21 | + {%- if ismain %}</strong>{% endif -%} |
| 22 | + </a> |
| 23 | + {%- endfor %} |
| 24 | + {%- else %} |
| 25 | + {{ firstname|e }} |
| 26 | + {%- endif %} |
| 27 | +{% endmacro %} |
| 28 | + |
| 29 | +{%- extends "layout.html" %} |
| 30 | +{% set title = _('Index') %} |
| 31 | +{% block body %} |
| 32 | + |
| 33 | +<h1 id="index">{{ _('Index') }}</h1> |
| 34 | + |
| 35 | +<div class="genindex-jumpbox"> |
| 36 | + {% for key, dummy in genindexentries -%} |
| 37 | + <a href="#{{ key }}"><strong>{{ key }}</strong></a> |
| 38 | + {% if not loop.last %}| {% endif %} |
| 39 | + {%- endfor %} |
| 40 | +</div> |
| 41 | + |
| 42 | +{%- for key, entries in genindexentries %} |
| 43 | +<h2 id="{{ key }}">{{ key }}</h2> |
| 44 | +<table style="width: 100%" class="indextable genindextable"><tr> |
| 45 | + {%- for column in entries|slice_index(2) if column %} |
| 46 | + <td style="width: 33%; vertical-align: top;"><ul> |
| 47 | + {%- for entryname, (links, subitems, _) in column %} |
| 48 | + <li>{{ indexentries(entryname, links) }} |
| 49 | + {%- if subitems %} |
| 50 | + <ul> |
| 51 | + {%- for subentryname, subentrylinks in subitems %} |
| 52 | + <li>{{ indexentries(subentryname, subentrylinks) }}</li> |
| 53 | + {%- endfor %} |
| 54 | + </ul> |
| 55 | + {%- endif -%}</li> |
| 56 | + {%- endfor %} |
| 57 | + </ul></td> |
| 58 | + {%- endfor %} |
| 59 | +</tr></table> |
| 60 | +{% endfor %} |
| 61 | + |
| 62 | +{% endblock %} |
| 63 | + |
| 64 | +{% block sidebarrel %} |
| 65 | +{% if split_index %} |
| 66 | + <h4>{{ _('Index') }}</h4> |
| 67 | + <p>{% for key, dummy in genindexentries -%} |
| 68 | + <a href="{{ pathto('genindex-' + key) }}"><strong>{{ key }}</strong></a> |
| 69 | + {% if not loop.last %}| {% endif %} |
| 70 | + {%- endfor %}</p> |
| 71 | + |
| 72 | + <p><a href="{{ pathto('genindex-all') }}"><strong>{{ _('Full index on one page') }}</strong></a></p> |
| 73 | +{% endif %} |
| 74 | + {{ super() }} |
| 75 | +{% endblock %} |
0 commit comments