Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog.d/pr436.doc.rst
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 4 additions & 0 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ div.related.top nav {
margin-bottom: -0.75em;
}

#searchbox {
margin-bottom: 1.25em;
}

.section h1 {
font-weight: 700;
}
Expand Down
47 changes: 4 additions & 43 deletions docs/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,8 @@
#}
{% extends "!layout.html" %}

{%- block footer %}
<div class="footer">
<p>
{% if show_copyright %}&copy;{{ copyright }}.{% endif %}
{% if theme_show_powered_by|lower == 'true' %}
{% if show_copyright %}|{% endif %}
{% if show_copyright %}|{% endif %}
Powered by <a href="http://sphinx-doc.org/">Sphinx {{ sphinx_version }}</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster {{ alabaster_version }}</a>
{% endif %}
{%- if show_source and has_source and sourcename %}
{% if show_copyright or theme_show_powered_by %}|{% endif %}
<a href="{{ pathto('_sources/' + sourcename, true)|e }}"
rel="nofollow">{{ _('Page source') }}</a>
{%- endif %}
</p>
<p>
For <a href="https://github.com/{{ theme_github_user }}/{{ theme_github_repo }}"
>semver {{ version }}</a>
</p>
</div>

{% if theme_github_banner|lower != 'false' %}
<a href="https://github.com/{{ theme_github_user }}/{{ theme_github_repo }}" class="github">
<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"/>
</a>
{% endif %}
{% if theme_analytics_id %}
<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{ theme_analytics_id }}']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
{% endif %}
{%- endblock %}
{%- block extrahead %}
{{- super() }}
<meta name="generator" content="Toms"/>
{% endblock %}
10 changes: 10 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']}"
Expand Down