diff --git a/changelog.d/pr436.doc.rst b/changelog.d/pr436.doc.rst new file mode 100644 index 00000000..5f078361 --- /dev/null +++ b/changelog.d/pr436.doc.rst @@ -0,0 +1,3 @@ +Move search box more at the top. This makes it easier for +users as if the TOC is long, the search box isn't visible +anymore. diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css index 81a5906f..33510db3 100644 --- a/docs/_static/css/custom.css +++ b/docs/_static/css/custom.css @@ -31,6 +31,10 @@ div.related.top nav { margin-bottom: -0.75em; } +#searchbox { + margin-bottom: 1.25em; +} + .section h1 { font-weight: 700; } diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 7a114d41..1f72ac26 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -3,47 +3,8 @@ #} {% extends "!layout.html" %} -{%- block footer %} -
-{% if theme_github_banner|lower != 'false' %} - -
-
-{% endif %}
-{% if theme_analytics_id %}
-
-{% endif %}
-{%- endblock %}
\ No newline at end of file
+{%- block extrahead %}
+ {{- super() }}
+
+{% endblock %}
\ No newline at end of file
diff --git a/docs/conf.py b/docs/conf.py
index 30a0fc5a..801e9eaf 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -211,6 +211,16 @@ def find_version(*file_paths):
html_static_path = ["_static"]
html_css_files = ["css/custom.css"]
+html_sidebars = {
+ "**": [
+ "about.html", # theme_logo
+ # 'relations.html', # prev and next
+ "searchbox.html", # basic/searchbox.html
+ "navigation.html", # TOC
+ # 'donate.html',
+ ]
+}
+
# Canonical link relation
if os.environ.get("READTHEDOCS_CANONICAL_URL"):
html_baseurl = f"{os.environ['READTHEDOCS_CANONICAL_URL']}"