Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 68d19f5

Browse filesBrowse files
authored
Merge pull request #436 from tomschr/docs-searchbox
Move search box more at the top
2 parents b2311cc + 254e7c5 commit 68d19f5
Copy full SHA for 68d19f5

File tree

4 files changed

+21
-43
lines changed
Filter options

4 files changed

+21
-43
lines changed

‎changelog.d/pr436.doc.rst

Copy file name to clipboard
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Move search box more at the top. This makes it easier for
2+
users as if the TOC is long, the search box isn't visible
3+
anymore.

‎docs/_static/css/custom.css

Copy file name to clipboardExpand all lines: docs/_static/css/custom.css
+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ div.related.top nav {
3131
margin-bottom: -0.75em;
3232
}
3333

34+
#searchbox {
35+
margin-bottom: 1.25em;
36+
}
37+
3438
.section h1 {
3539
font-weight: 700;
3640
}

‎docs/_templates/layout.html

Copy file name to clipboardExpand all lines: docs/_templates/layout.html
+4-43
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,8 @@
33
#}
44
{% extends "!layout.html" %}
55

6-
{%- block footer %}
7-
<div class="footer">
8-
<p>
9-
{% if show_copyright %}&copy;{{ copyright }}.{% endif %}
10-
{% if theme_show_powered_by|lower == 'true' %}
11-
{% if show_copyright %}|{% endif %}
12-
{% if show_copyright %}|{% endif %}
13-
Powered by <a href="http://sphinx-doc.org/">Sphinx {{ sphinx_version }}</a>
14-
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster {{ alabaster_version }}</a>
15-
{% endif %}
16-
{%- if show_source and has_source and sourcename %}
17-
{% if show_copyright or theme_show_powered_by %}|{% endif %}
18-
<a href="{{ pathto('_sources/' + sourcename, true)|e }}"
19-
rel="nofollow">{{ _('Page source') }}</a>
20-
{%- endif %}
21-
</p>
22-
<p>
23-
For <a href="https://github.com/{{ theme_github_user }}/{{ theme_github_repo }}"
24-
>semver {{ version }}</a>
25-
</p>
26-
</div>
276

28-
{% if theme_github_banner|lower != 'false' %}
29-
<a href="https://github.com/{{ theme_github_user }}/{{ theme_github_repo }}" class="github">
30-
<img style="position: absolute; top: 0; right: 0; border: 0;" src="{{ pathto('_static/' ~ theme_github_banner, 1) if theme_github_banner|lower != 'true' else 'https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png' }}" alt="Fork me on GitHub" class="github"/>
31-
</a>
32-
{% endif %}
33-
{% if theme_analytics_id %}
34-
<script type="text/javascript">
35-
36-
var _gaq = _gaq || [];
37-
_gaq.push(['_setAccount', '{{ theme_analytics_id }}']);
38-
_gaq.push(['_setDomainName', 'none']);
39-
_gaq.push(['_setAllowLinker', true]);
40-
_gaq.push(['_trackPageview']);
41-
42-
(function() {
43-
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
44-
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
45-
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
46-
})();
47-
</script>
48-
{% endif %}
49-
{%- endblock %}
7+
{%- block extrahead %}
8+
{{- super() }}
9+
<meta name="generator" content="Toms"/>
10+
{% endblock %}

‎docs/conf.py

Copy file name to clipboardExpand all lines: docs/conf.py
+10
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,16 @@ def find_version(*file_paths):
211211
html_static_path = ["_static"]
212212
html_css_files = ["css/custom.css"]
213213

214+
html_sidebars = {
215+
"**": [
216+
"about.html", # theme_logo
217+
# 'relations.html', # prev and next
218+
"searchbox.html", # basic/searchbox.html
219+
"navigation.html", # TOC
220+
# 'donate.html',
221+
]
222+
}
223+
214224
# Canonical link relation
215225
if os.environ.get("READTHEDOCS_CANONICAL_URL"):
216226
html_baseurl = f"{os.environ['READTHEDOCS_CANONICAL_URL']}"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.