docs: Fix TOC text and put them in a div

This allows us to flex them together, so now you get one column on the
left with the title "Documents" and one on the right saying
"Sections" on narrow screens.

On wide screens it doesn't say "Table Of Contents" twice.

This should make it clearer
This commit is contained in:
Fabian Homborg 2021-01-27 22:02:35 +01:00
parent 3d180b7c50
commit ca3d226659
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,13 @@
{#
basic/globaltoc.html
~~~~~~~~~~~~~~~~~~~~
Sphinx sidebar template: global table of contents.
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
<div>
<h3><a href="{{ pathto(master_doc)|e }}">{{ _('Documents') }}</a></h3>
{{ toctree(includehidden=theme_globaltoc_includehidden, collapse=theme_globaltoc_collapse, maxdepth=theme_globaltoc_maxdepth) }}
</div>

View file

@ -0,0 +1,13 @@
{#
basic/localtoc.html
~~~~~~~~~~~~~~~~~~~
Sphinx sidebar template: local table of contents.
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
<div>
<h4><a href="{{ pathto(master_doc)|e }}">{{ _('Sections') }}</a></h4>
{{ toc }}
</div>