diff --git a/docs/Makefile b/docs/Makefile index 95802e63d01..285b71a53b6 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -24,8 +24,8 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ru default: $(SPHINXBUILD) -b html $(SPHINXOPTS) ru $(BUILDDIR)/docs/ru $(SPHINXBUILD) -b html $(SPHINXOPTS) en $(BUILDDIR)/docs/en - SPHINX_TEMPLATES=../_singlehtml_templates $(SPHINXBUILD) -b singlehtml $(SPHINXOPTS) ru $(BUILDDIR)/docs/ru/single - SPHINX_TEMPLATES=../_singlehtml_templates $(SPHINXBUILD) -b singlehtml $(SPHINXOPTS) en $(BUILDDIR)/docs/en/single + $(SPHINXBUILD) -b singlehtml $(SPHINXOPTS) ru $(BUILDDIR)/docs/ru/single + $(SPHINXBUILD) -b singlehtml $(SPHINXOPTS) en $(BUILDDIR)/docs/en/single help: @echo "Please use \`make ' where is one of" diff --git a/docs/_singlehtml_templates/navigation.html b/docs/_singlehtml_templates/navigation.html deleted file mode 100644 index f98fc4161f7..00000000000 --- a/docs/_singlehtml_templates/navigation.html +++ /dev/null @@ -1,10 +0,0 @@ -

{{ _('Navigation') }}

-{{ toctree(includehidden=theme_sidebar_includehidden, collapse=False) }} -{% if theme_extra_nav_links %} -
- -{% endif %} diff --git a/docs/_static/custom.css b/docs/_static/custom.css index e9e25250dcd..11b6c05856a 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -1,23 +1,65 @@ -div.document, div.footer { +div.document { + margin: 20px auto 0 auto; +} +div.document, +div.footer { width: 1240px; } div.sphinxsidebarwrapper { padding: 2px 10px; } -div.body dd, div.body li, div.body p { +div.body p { line-height: 1.6em; } -div.body blockquote, div.body dd, div.body li, div.body p { +div.body dd, +div.body li { + line-height: 1.2em; + margin-bottom: 0.4em; +} +div.body blockquote, +div.body dd, +div.body li, +div.body p { -moz-hyphens: none; -ms-hyphens: none; -webkit-hyphens: none; hyphens: none; } +input { + padding: 2px; +} +div.sphinxsidebar #searchbox input[type="text"] { + width: 190px; +} +div.sphinxsidebar #searchbox input[type="submit"], +#search-form input[type="submit"] { + padding: 4px 8px; +} +#searchbox, #extra-nav-links { + margin: 20px 0; +} +ol ol ul, +ol ul ul, +ul ol ul, +ul ul ul, +ul ul, +ol ul, +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points +{ + list-style-type: disc; +} +blockquote { + line-height: 1.4em; + border-left: 4px solid #ccc; + margin: 0; + padding: 0 0 0 20px; +} div.sphinxsidebarwrapper p.logo { float: left; text-align: left; - margin: -4px 4px 0 0; + margin: -2px 6px 0 0; } div.sphinxsidebar a { @@ -26,7 +68,10 @@ div.sphinxsidebar a { } pre { - padding: 4px; + padding: 6px; +} +code { + padding: 2px; } input { diff --git a/docs/_templates/navigation.html b/docs/_templates/navigation.html new file mode 100644 index 00000000000..6a2deb8eb57 --- /dev/null +++ b/docs/_templates/navigation.html @@ -0,0 +1,8 @@ +{% if theme_extra_nav_links %} + +{% endif %} +{{ toctree(includehidden=theme_sidebar_includehidden, collapse=builder != "singlehtml") }} diff --git a/docs/_templates/search.html b/docs/_templates/search.html new file mode 100644 index 00000000000..458afd627bc --- /dev/null +++ b/docs/_templates/search.html @@ -0,0 +1,50 @@ +{%- extends "layout.html" %} +{% set title = _('Search') %} +{% set script_files = script_files + ['_static/searchtools.js'] %} +{% block extrahead %} + + {# this is used when loading the search index using $.ajax fails, + such as on Chrome for documents on localhost #} + + {{ super() }} +{% endblock %} +{% block body %} +

{{ _('Search') }}

+
+ +

+ {% trans %}Please activate JavaScript to enable the search + functionality.{% endtrans %} +

+
+

+ {% trans %}From here you can search these documents. Enter your search + words into the box below and click "search". Note that the search + function will automatically search for all of the words. Pages + containing fewer words won't appear in the result list.{% endtrans %} +

+
+ + + +
+ {% if search_performed %} +

{{ _('Search Results') }}

+ {% if not search_results %} +

{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}

+ {% endif %} + {% endif %} +
+ {% if search_results %} +
    + {% for href, caption, context in search_results %} +
  • {{ caption }} +
    {{ context|e }}
    +
  • + {% endfor %} +
+ {% endif %} +
+{% endblock %} diff --git a/docs/_templates/searchbox.html b/docs/_templates/searchbox.html new file mode 100644 index 00000000000..ec3564f6960 --- /dev/null +++ b/docs/_templates/searchbox.html @@ -0,0 +1,11 @@ +{%- if pagename != "search" and builder != "singlehtml" %} + + +{%- endif %} diff --git a/docs/en/conf.py b/docs/en/conf.py index ffeda0bd1cb..f3276eca94b 100644 --- a/docs/en/conf.py +++ b/docs/en/conf.py @@ -174,9 +174,9 @@ html_static_path = ['../_static'] html_sidebars = { '**': [ 'about.html', + 'searchbox.html', 'navigation.html', 'relations.html', - 'searchbox.html', ] } diff --git a/docs/ru/conf.py b/docs/ru/conf.py index f6b76e01aec..ce6fa6ce309 100644 --- a/docs/ru/conf.py +++ b/docs/ru/conf.py @@ -174,9 +174,9 @@ html_static_path = ['../_static'] html_sidebars = { '**': [ 'about.html', + 'searchbox.html', 'navigation.html', 'relations.html', - 'searchbox.html', ] }