From: Yury Selivanov Date: Wed, 19 Sep 2018 21:51:17 +0000 (-0400) Subject: bpo-34733: Return of the docs search bar (GH-9431) X-Git-Tag: v3.7.1rc1~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=581890cda36f60cd46185c6e184abe35a95813a2;p=thirdparty%2FPython%2Fcpython.git bpo-34733: Return of the docs search bar (GH-9431) Partially revert changes to Doc/tools/templates/layout.html accidentally committed in 512d7101098b971837cbb406942215244f636547. --- diff --git a/Doc/tools/templates/layout.html b/Doc/tools/templates/layout.html index c39922456140..8cf903dec6ef 100644 --- a/Doc/tools/templates/layout.html +++ b/Doc/tools/templates/layout.html @@ -1,27 +1,106 @@ {% extends "!layout.html" %} - {% block rootrellink %} -{{ super() }} -
  • - {%- if switchers is defined %} - {{ language or 'en' }} - {{ release }} - {% trans %}Documentation {% endtrans %}{{ reldelim1 }} - {%- else %} - {{ shorttitle }}{{ reldelim1 }} - {%- endif %} +
  • +
  • Python{{ reldelim1 }}
  • +
  • + {%- if switchers is defined %} + {{ language or 'en' }} + {{ release }} + {% trans %}Documentation {% endtrans %}{{ reldelim1 }} + {%- else %} + {{ shorttitle }}{{ reldelim1 }} + {%- endif %} +
  • +{% endblock %} +{%- macro searchbox() %} +{# modified from sphinx/themes/basic/searchbox.html #} + {%- if builder != "htmlhelp" %} + + + {%- endif %} +{%- endmacro %} +{% block relbar1 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %} +{% block relbar2 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %} +{% block relbaritems %} + {%- if pagename != "search" and builder != "singlehtml" and builder != "htmlhelp" %} +
  • + {{ searchbox() }} + {{ reldelim2 }}
  • + {%- endif %} {% endblock %} - {% block extrahead %} + {% if builder != "htmlhelp" %} - {% if switchers is defined and not embedded %} - {% endif %} - {% if pagename == 'whatsnew/changelog' and not embedded %} - {% endif %} - {% endif %} + {% if not embedded %}{% endif %} + {% if switchers is defined and not embedded %}{% endif %} + {% if pagename == 'whatsnew/changelog' and not embedded %} + + {% endif %} + {% endif %} {# custom CSS; used in asyncio docs! #} {{ super() }} {% endblock %} +{% block footer %} + +{% endblock %}