mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
[docs] Improve sidebar (#12461)
- Remove "Site navigation" header - this is already contextually clear (especially since separators were added in #12439) - Hide "On this page" if `display_toc is False` - Format "On this page" header similar to top-level site-nav sections
This commit is contained in:
parent
c5bd2d42c5
commit
bcf32428c8
11
doc/_themes/sphinx13/layout.html
vendored
11
doc/_themes/sphinx13/layout.html
vendored
@ -34,12 +34,13 @@
|
||||
<div class="document">
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||||
{%- include "searchfield.html" %}
|
||||
<div class="sphinxsidebar-navigation__contents">
|
||||
<h3>{{ _('On this page') }}</h3>
|
||||
{{ toc }}
|
||||
</div>
|
||||
{%- if display_toc %}
|
||||
<div class="sphinxsidebar-navigation__contents">
|
||||
<h3>{{ _('On this page') }}</h3>
|
||||
{{ toc }}
|
||||
</div>
|
||||
{%- endif %}
|
||||
<div class="sphinxsidebar-navigation__pages">
|
||||
<h3>{{ _('Site navigation') }}</h3>
|
||||
{{ toctree(includehidden=True, maxdepth=3, titles_only=True) }}
|
||||
</div>
|
||||
</div>
|
||||
|
3
doc/_themes/sphinx13/static/sphinx13.css
vendored
3
doc/_themes/sphinx13/static/sphinx13.css
vendored
@ -110,7 +110,8 @@ div.sphinxsidebar input {
|
||||
}
|
||||
|
||||
div.sphinxsidebar h3 {
|
||||
font-size: 1.5em;
|
||||
font-size: 1.2em;
|
||||
font-weight: 300;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5em;
|
||||
padding-top: 0.5em;
|
||||
|
Loading…
Reference in New Issue
Block a user