cpython: 274b25cd501f (original) (raw)

Mercurial > cpython

changeset 103456:274b25cd501f 3.5

Issue #19489: Move the search box from sidebar to header and footer. [#19489]

Zachary Ware zachary.ware@gmail.com
date Fri, 09 Sep 2016 13:11:27 -0700
parents ab1e10e3dc35
children 0f94a8fa5445 8927417c5e88
files Doc/conf.py Doc/tools/pydoctheme/static/pydoctheme.css Doc/tools/templates/customsourcelink.html Doc/tools/templates/layout.html
diffstat 4 files changed, 45 insertions(+), 11 deletions(-)[+] [-] Doc/conf.py 5 Doc/tools/pydoctheme/static/pydoctheme.css 11 Doc/tools/templates/customsourcelink.html 10 Doc/tools/templates/layout.html 30

line wrap: on

line diff

--- a/Doc/conf.py +++ b/Doc/conf.py @@ -60,7 +60,10 @@ templates_path = ['tools/templates']

Custom sidebar templates, filenames relative to this file.

html_sidebars = {

}

Additional templates that should be rendered to pages.

--- a/Doc/tools/pydoctheme/static/pydoctheme.css +++ b/Doc/tools/pydoctheme/static/pydoctheme.css @@ -22,6 +22,16 @@ div.related:first-child { border-bottom: 1px solid #ccc; } +.inline-search {

+} +form.inline-search input {

+} +form.inline-search input[type="submit"] {

+} + div.sphinxsidebar { background-color: #eeeeee; border-radius: 5px; @@ -45,6 +55,7 @@ div.sphinxsidebar a:hover { color: #0095C4; } +form.inline-search input, div.sphinxsidebar input { font-family: 'Lucida Grande',Arial,sans-serif; border: 1px solid #999999;

new file mode 100644 --- /dev/null +++ b/Doc/tools/templates/customsourcelink.html @@ -0,0 +1,10 @@ +{%- if show_source and has_source and sourcename %}

[](#l3.12)
  • [](#l3.13) +{%- endif %}[](#l3.14)
  • --- a/Doc/tools/templates/layout.html +++ b/Doc/tools/templates/layout.html @@ -12,8 +12,28 @@ {%- endif %} {% endblock %} +{%- macro searchbox() %} +{# modified from sphinx/themes/basic/searchbox.html #}

    +{%- endmacro %} {% block relbar1 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %} {% block relbar2 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %} +{% block relbaritems %}

    +{% endblock %} {% block extrahead %} {% if not embedded %}{% endif %} @@ -90,13 +110,3 @@ {% trans sphinx_version=sphinx_version|e %}Created using Sphinx {{ sphinx_version }}.{% endtrans %} {% endblock %} -{% block sidebarsourcelink %} -{%- if show_source and has_source and sourcename %} -

    {{ _('This Page') }}

    - -{%- endif %} -{% endblock %}