Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7640739

Browse files
committed
Add language and version switcher placeholders
1 parent ff61d60 commit 7640739

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

python_docs_theme/layout.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,31 @@
99
{% endif %}
1010
{% endblock %}
1111

12+
{%- macro relbar() %}
13+
{# modified from sphinx/themes/basic/layout.html #}
14+
<div class="related" role="navigation" aria-label="related navigation">
15+
<h3>{{ _('Navigation') }}</h3>
16+
<ul>
17+
{%- for rellink in rellinks %}
18+
<li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}>
19+
<a href="{{ pathto(rellink[0])|e }}" title="{{ rellink[1]|striptags|e }}"
20+
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
21+
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
22+
{%- endfor %}
23+
{%- block rootrellink %}
24+
<li class="nav-item nav-item-0"><a href="{{ pathto(master_doc)|e }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li>
25+
{%- endblock %}
26+
<div class="language_switcher_placeholder"></div>
27+
<div class="version_switcher_placeholder"></div>
28+
{%- for parent in parents %}
29+
<li class="nav-item nav-item-{{ loop.index }}"><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
30+
{%- endfor %}
31+
<li class="nav-item nav-item-this"><a href="{{ link|e }}">{{ title }}</a></li>
32+
{%- block relbaritems %} {% endblock %}
33+
</ul>
34+
</div>
35+
{%- endmacro %}
36+
1237
{%- macro searchbox() %}
1338
{# modified from sphinx/themes/basic/searchbox.html #}
1439
{%- if builder != "htmlhelp" %}

0 commit comments

Comments
 (0)