docs: Make TOC appear first on narrow screens

This used to put the TOC last, which is the last place you'd want it.

It's not perfect and we do some hacky layoutery to achieve it, but it
should generally be usable.
This commit is contained in:
Fabian Homborg 2021-01-27 21:53:24 +01:00
parent 711fa31871
commit 3d180b7c50
2 changed files with 15 additions and 0 deletions

View file

@ -37,6 +37,8 @@
{%- endif %}
{% endblock %}
{% block sidebar1 %}{{ sidebar() }}{% endblock %}
{% block sidebar2 %} {% endblock %}
{% block extrahead %}
<link rel="shortcut icon" type="image/png" href="{{ pathto('_static/' + theme_root_icon, 1) }}" />
{% if builder != "htmlhelp" %}

View file

@ -241,6 +241,19 @@ dl > dt span ~ em {
height: auto;
position: relative;
}
div.sphinxsidebar ul {
flex-basis: content;
flex-wrap: wrap;
}
div.sphinxsidebarwrapper {
display: flex;
}
div.sphinxsidebarwrapper > h3:nth-child(5) {
display: none;
}
div#searchbox {
display: none !important;
}
div.content {margin-left: 0;}
div.bodywrapper {