mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-14 09:22:11 -05: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:
1 parent
c5bd2d42c5
commit
bcf32428c8
2 files changed
+8
-6
No files matched your search
Vendored
+6
-5
@@ -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>
|
||||
|
||||
+2
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user