summaryrefslogtreecommitdiffstats
path: root/Doc/tools/templates
diff options
context:
space:
mode:
authorJulien Palard <julien@palard.fr>2020-11-07 11:28:31 (GMT)
committerGitHub <noreply@github.com>2020-11-07 11:28:31 (GMT)
commitee2549c2ba8bae00f2b2fea8a39c6dfbd1d06520 (patch)
tree92476e3944b652398732e09e64c3893759e68b17 /Doc/tools/templates
parent825ac383327255d38b69a753e5e41710bb3ed010 (diff)
downloadcpython-ee2549c2ba8bae00f2b2fea8a39c6dfbd1d06520.zip
cpython-ee2549c2ba8bae00f2b2fea8a39c6dfbd1d06520.tar.gz
cpython-ee2549c2ba8bae00f2b2fea8a39c6dfbd1d06520.tar.bz2
bpo-41028: Doc: Move switchers to docsbuild-scripts. (GH-20969)
Diffstat (limited to 'Doc/tools/templates')
-rw-r--r--Doc/tools/templates/dummy.html9
-rw-r--r--Doc/tools/templates/indexsidebar.html8
-rw-r--r--Doc/tools/templates/layout.html10
3 files changed, 12 insertions, 15 deletions
diff --git a/Doc/tools/templates/dummy.html b/Doc/tools/templates/dummy.html
index 68ae3ad..3438b44 100644
--- a/Doc/tools/templates/dummy.html
+++ b/Doc/tools/templates/dummy.html
@@ -6,3 +6,12 @@ In extensions/pyspecific.py:
{% trans %}CPython implementation detail:{% endtrans %}
{% trans %}Deprecated since version {deprecated}, will be removed in version {removed}{% endtrans %}
{% trans %}Deprecated since version {deprecated}, removed in version {removed}{% endtrans %}
+
+
+In docsbuild-scripts, when rewriting indexsidebar.html with actual versions:
+
+{% trans %}in development{% endtrans %}
+{% trans %}pre-release{% endtrans %}
+{% trans %}stable{% endtrans %}
+{% trans %}security-fixes{% endtrans %}
+{% trans %}EOL{% endtrans %}
diff --git a/Doc/tools/templates/indexsidebar.html b/Doc/tools/templates/indexsidebar.html
index 1c1cb54..f7bf6d8 100644
--- a/Doc/tools/templates/indexsidebar.html
+++ b/Doc/tools/templates/indexsidebar.html
@@ -2,12 +2,8 @@
<p><a href="{{ pathto('download') }}">{% trans %}Download these documents{% endtrans %}</a></p>
<h3>{% trans %}Docs by version{% endtrans %}</h3>
<ul>
- <li><a href="https://docs.python.org/3.10/">{% trans %}Python 3.10 (in development){% endtrans %}</a></li>
- <li><a href="https://docs.python.org/3.9/">{% trans %}Python 3.9 (pre-release){% endtrans %}</a></li>
- <li><a href="https://docs.python.org/3.8/">{% trans %}Python 3.8 (stable){% endtrans %}</a></li>
- <li><a href="https://docs.python.org/3.7/">{% trans %}Python 3.7 (stable){% endtrans %}</a></li>
- <li><a href="https://docs.python.org/3.6/">{% trans %}Python 3.6 (security-fixes){% endtrans %}</a></li>
- <li><a href="https://docs.python.org/2.7/">{% trans %}Python 2.7 (EOL){% endtrans %}</a></li>
+ <li><a href="https://docs.python.org/">{% trans %}Stable{% endtrans %}</a></li>
+ <li><a href="https://docs.python.org/dev/">{% trans %}In development{% endtrans %}</a></li>
<li><a href="https://www.python.org/doc/versions/">{% trans %}All versions{% endtrans %}</a></li>
</ul>
diff --git a/Doc/tools/templates/layout.html b/Doc/tools/templates/layout.html
index 17592d7..98ccf42 100644
--- a/Doc/tools/templates/layout.html
+++ b/Doc/tools/templates/layout.html
@@ -12,22 +12,14 @@
{% block rootrellink %}
{{ super() }}
- <li>
- {%- if switchers is defined %}
- <span class="language_switcher_placeholder">{{ language or 'en' }}</span>
- <span class="version_switcher_placeholder">{{ release }}</span>
- <a href="{{ pathto('index') }}">{% trans %}Documentation {% endtrans %}</a>{{ reldelim1 }}
- {%- else %}
+ <li id="cpython-language-and-version">
<a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}
- {%- endif %}
</li>
{% endblock %}
{% block extrahead %}
<link rel="canonical" href="https://docs.python.org/3/{{pagename}}.html" />
{% if builder != "htmlhelp" %}
- {% if switchers is defined and not embedded %}
- <script type="text/javascript" src="{{ pathto('_static/switchers.js', 1) }}"></script>{% endif %}
{% if pagename == 'whatsnew/changelog' and not embedded %}
<script type="text/javascript" src="{{ pathto('_static/changelog_search.js', 1) }}"></script>{% endif %}
{% endif %}