Skip to content

Commit 2cf0516

Browse files
committed
Fix genindex page and lua-modindex
1 parent d0ce8b9 commit 2cf0516

File tree

3 files changed

+131
-82
lines changed

3 files changed

+131
-82
lines changed

_theme/tarantool/domainindex.html

Lines changed: 65 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,48 +9,77 @@
99
#}
1010
{%- extends "layout.html" %}
1111
{% set title = indextitle %}
12+
1213
{% block extrahead %}
1314
{{ super() }}
1415
{% if not embedded and collapse_index %}
15-
<script type="text/javascript">
16-
DOCUMENTATION_OPTIONS.COLLAPSE_INDEX = true;
17-
</script>
16+
<script type="text/javascript">
17+
DOCUMENTATION_OPTIONS.COLLAPSE_INDEX = true;
18+
</script>
1819
{% endif %}
1920
{% endblock %}
21+
2022
{% block body %}
23+
<section class="b-block b-modindex-block-top">
24+
<div class="b-block-wrapper">
25+
{%- set groupid = idgen() %}
2126

22-
{%- set groupid = idgen() %}
23-
24-
<h1>{{ indextitle }}</h1>
25-
26-
<div class="modindex-jumpbox">
27-
{%- for (letter, entries) in content %}
28-
<a href="#cap-{{ letter }}"><strong>{{ letter }}</strong></a>
29-
{%- if not loop.last %} | {% endif %}
30-
{%- endfor %}
31-
</div>
32-
33-
<table class="indextable modindextable" cellspacing="0" cellpadding="2">
34-
{%- for letter, entries in content %}
35-
<tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
36-
<tr class="cap" id="cap-{{ letter }}"><td></td><td>
37-
<strong>{{ letter }}</strong></td><td></td></tr>
38-
{%- for (name, grouptype, page, anchor, extra, qualifier, description)
39-
in entries %}
40-
<tr{% if grouptype == 2 %} class="cg-{{ groupid.current() }}"{% endif %}>
41-
<td>{% if grouptype == 1 -%}
42-
<img src="{{ pathto('_static/minus.png', 1) }}" class="toggler"
43-
id="toggle-{{ groupid.next() }}" style="display: none" alt="-" />
44-
{%- endif %}</td>
45-
<td>{% if grouptype == 2 %}&#160;&#160;&#160;{% endif %}
46-
{% if page %}<a href="{{ pathto(page) }}#{{ anchor }}">{% endif -%}
47-
<code class="xref">{{ name|e }}</code>
48-
{%- if page %}</a>{% endif %}
49-
{%- if extra %} <em>({{ extra|e }})</em>{% endif -%}
50-
</td><td>{% if qualifier %}<strong>{{ qualifier|e }}:</strong>{% endif %}
51-
<em>{{ description|e }}</em></td></tr>
52-
{%- endfor %}
53-
{%- endfor %}
54-
</table>
27+
<h1 class="b-section-title" id="index">{{ indextitle }}</h1>
5528

29+
<div class="modindex-jumpbox">
30+
{%- for (letter, entries) in content %}
31+
<a href="#cap-{{ letter }}"><strong>{{ letter }}</strong></a>
32+
{%- if not loop.last %} | {% endif %}
33+
{%- endfor %}
34+
</div>
35+
</div>
36+
</section>
37+
38+
<section class="b-block b-modindex-block">
39+
<div class="b-block-wrapper">
40+
<table class="indextable modindextable"
41+
cellspacing="0"
42+
cellpadding="2">
43+
{%- for letter, entries in content %}
44+
<tr class="pcap">
45+
<td></td>
46+
<td>&#160;</td>
47+
<td></td>
48+
</tr>
49+
<tr class="cap" id="cap-{{ letter }}">
50+
<td></td>
51+
<td><strong>{{ letter }}</strong></td>
52+
<td></td>
53+
</tr>
54+
{%- for (name, grouptype, page, anchor,
55+
extra, qualifier, description) in entries %}
56+
<tr{% if grouptype == 2 %} class="cg-{{ groupid.current() }}"{% endif %}>
57+
<td>
58+
{% if grouptype == 1 -%}
59+
<img src="{{ pathto('_static/minus.png', 1) }}"
60+
class="toggler"
61+
id="toggle-{{ groupid.next() }}"
62+
style="display: none"
63+
alt="-" />
64+
{%- endif %}
65+
</td>
66+
<td>
67+
{% if grouptype == 2 %}&#160;&#160;&#160;{% endif %}
68+
{% if page %}<a href="{{ pathto(page) }}#{{ anchor }}">{% endif -%}
69+
<code class="xref">{{ name|e }}</code>
70+
{%- if page %}</a>{% endif %}
71+
{%- if extra %}<em>({{ extra|e }})</em>{% endif -%}
72+
</td>
73+
<td>
74+
{% if qualifier %}<strong>{{ qualifier|e }}:</strong>{% endif %}
75+
<em>{{ description|e }}</em>
76+
</td>
77+
</tr>
78+
{%- endfor %}
79+
{%- endfor %}
80+
</table>
81+
</div>
82+
</section>
5683
{% endblock %}
84+
85+
{# vim: syntax=htmldjango ts=2 sts=2 sw=2 expandtab #}

_theme/tarantool/genindex.html

Lines changed: 61 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{%- if links -%}
1313
<a href="{{ links[0][1] }}">
1414
{%- if links[0][0] %}<strong>{% endif -%}
15-
{{ firstname|e }}
15+
{{ firstname | e }}
1616
{%- if links[0][0] %}</strong>{% endif -%}
1717
</a>
1818

@@ -23,55 +23,75 @@
2323
</a>
2424
{%- endfor %}
2525
{%- else %}
26-
{{ firstname|e }}
26+
{{ firstname | e }}
2727
{%- endif %}
2828
</dt>
2929
{% endmacro %}
3030

3131
{%- extends "layout.html" %}
3232
{% set title = _('Index') %}
33-
{% block body %}
34-
35-
<h1 id="index">{{ _('Index') }}</h1>
36-
37-
<div class="genindex-jumpbox">
38-
{% for key, dummy in genindexentries -%}
39-
<a href="#{{ key }}"><strong>{{ key }}</strong></a>
40-
{% if not loop.last %}| {% endif %}
41-
{%- endfor %}
42-
</div>
4333

44-
{%- for key, entries in genindexentries %}
45-
<h2 id="{{ key }}">{{ key }}</h2>
46-
<table style="width: 100%" class="indextable genindextable"><tr>
47-
{%- for column in entries|slice_index(2) if column %}
48-
<td style="width: 33%" valign="top"><dl>
49-
{%- for entryname, (links, subitems, _) in column %}
50-
{{ indexentries(entryname, links) }}
51-
{%- if subitems %}
52-
<dd><dl>
53-
{%- for subentryname, subentrylinks in subitems %}
54-
{{ indexentries(subentryname, subentrylinks) }}
34+
{% block body %}
35+
<section class="b-block-lightgray b-genindex-block-top">
36+
<div class="b-block-wrapper">
37+
<h1 class="b-section-title" id="index">{{ _('Index') }}</h1>
38+
<div class="genindex-jumpbox">
39+
{% for key, dummy in genindexentries -%}
40+
<a href="#{{ key }}"><strong>{{ key }}</strong></a>
41+
{% if not loop.last %} | {% endif %}
5542
{%- endfor %}
56-
</dl></dd>
57-
{%- endif -%}
58-
{%- endfor %}
59-
</dl></td>
60-
{%- endfor %}
61-
</tr></table>
62-
{% endfor %}
43+
</div>
44+
</div>
45+
</section>
6346

47+
48+
<section class="b-block b-genindex-block-top">
49+
<div class="b-block-wrapper">
50+
{%- for key, entries in genindexentries %}
51+
<h2 id="{{ key }}">{{ key }}</h2>
52+
<table style="width: 100%" class="indextable genindextable">
53+
<tr>
54+
{%- for column in entries|slice_index(2) if column %}
55+
<td style="width: 33%" valign="top">
56+
<dl>
57+
{%- for entryname, (links, subitems, _) in column %}
58+
{{ indexentries(entryname, links) }}
59+
{%- if subitems %}
60+
<dd>
61+
<dl>
62+
{%- for subentryname, subentrylinks in subitems %}
63+
{{ indexentries(subentryname, subentrylinks) }}
64+
{%- endfor %}
65+
</dl>
66+
</dd>
67+
{%- endif -%}
68+
{%- endfor %}
69+
</dl>
70+
</td>
71+
{%- endfor %}
72+
</tr>
73+
</table>
74+
{% endfor %}
75+
</div>
76+
</section>
6477
{% endblock %}
6578

66-
{% block sidebarrel %}
67-
{% if split_index %}
68-
<h4>{{ _('Index') }}</h4>
69-
<p>{% for key, dummy in genindexentries -%}
70-
<a href="{{ pathto('genindex-' + key) }}"><strong>{{ key }}</strong></a>
71-
{% if not loop.last %}| {% endif %}
72-
{%- endfor %}</p>
79+
{#% block sidebarrel %}
80+
{% if split_index %}
81+
<h4>{{ _('Index') }}</h4>
82+
<p>
83+
{% for key, dummy in genindexentries -%}
84+
<a href="{{ pathto('genindex-' + key) }}"><strong>{{ key }}</strong></a>
85+
{% if not loop.last %}| {% endif %}
86+
{%- endfor %}
87+
</p>
88+
<p>
89+
<a href="{{ pathto('genindex-all') }}">
90+
<strong>{{ _('Full index on one page') }}</strong>
91+
</a>
92+
</p>
93+
{% endif %}
94+
{{ super() }}
95+
{% endblock %#}
7396

74-
<p><a href="{{ pathto('genindex-all') }}"><strong>{{ _('Full index on one page') }}</strong></a></p>
75-
{% endif %}
76-
{{ super() }}
77-
{% endblock %}
97+
{# vim: syntax=htmldjango ts=2 sts=2 sw=2 expandtab #}

conf.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
'doc/book/connectors/__*',
4343
'doc/book/replication/*_1.rst',
4444
'doc/book/replication/*_2.rst',
45-
'doc/book/configuration/cfg_*',
45+
'doc/reference/configuration/cfg_*',
4646
'doc/book/admin.rst',
4747
'doc/book/box/box_introspection.rst',
4848
'doc/book/replication.rst',
@@ -89,11 +89,11 @@
8989
'try' : True,
9090
'rocks' : True,
9191
# Helper webpages
92-
'404' : True,
92+
'404' : True,
9393
# Internal webpages
94-
'genindex' : True,
95-
'modindex' : True,
96-
'search' : True
94+
'genindex' : True,
95+
'lua-modindex' : True,
96+
'search' : True
9797
},
9898
'wp_local': True
9999
}

0 commit comments

Comments
 (0)