Back to Sphinx

{% trans key=key %}Index – {{ key }}{% endtrans %}

sphinx/themes/basic/genindex-single.html

9.1.01.3 KB
Original Source

{# Template for a "single" page of a split index. #} {% macro indexentries(firstname, links) %} {%- if links -%} {%- if links[0][0] %}{% endif -%} {{ firstname|e }} {%- if links[0][0] %}{% endif -%} {%- for ismain, link in links[1:] -%} , {% if ismain %}{% endif -%} [{{ loop.index }}] {%- if ismain %}{% endif -%} {%- endfor %} {%- else %} {{ firstname|e }} {%- endif %} {% endmacro %} {%- extends "layout.html" %} {% set title = _('Index') %} {% block body %} {# We use instead of for XHTML compatibility #}

{% trans key=key %}Index – {{ key }}{% endtrans %}

| {%- for column in entries|slice(2) if column %}
{%- for entryname, (links, subitems, _) in column %} - {{ indexentries(entryname, links) }} {%- if subitems %} {%- for subentryname, subentrylinks in subitems %} - {{ indexentries(subentryname, subentrylinks) }} {%- endfor %} {%- endif -%} {%- endfor %} | {%- endfor %}

{% endblock %} {% block sidebarrel %}

{{ _('Index') }}

{% for key, dummy in genindexentries -%} {{ key }} {% if not loop.last %}| {% endif %} {%- endfor %}

{{ _('Full index on one page') }}

{{ super() }} {% endblock %}