mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
base theme: Wrap sidebar components in <div>s
Responsive themes inheriting from the base theme might want to display the sidebar horizontally on narrower screens, which can be easily achieved with flexbox. This however requires that the individual sidebar components are wrapped in HTML elements so that flexbox can properly lay them out.
This commit is contained in:
parent
1f91a0f8bd
commit
9e7e6dd5ed
@ -8,6 +8,8 @@
|
||||
:license: BSD, see LICENSE for details.
|
||||
#}
|
||||
{%- if display_toc %}
|
||||
<h3><a href="{{ pathto(root_doc)|e }}">{{ _('Table of Contents') }}</a></h3>
|
||||
{{ toc }}
|
||||
<div>
|
||||
<h3><a href="{{ pathto(root_doc)|e }}">{{ _('Table of Contents') }}</a></h3>
|
||||
{{ toc }}
|
||||
</div>
|
||||
{%- endif %}
|
||||
|
@ -8,12 +8,16 @@
|
||||
:license: BSD, see LICENSE for details.
|
||||
#}
|
||||
{%- if prev %}
|
||||
<h4>{{ _('Previous topic') }}</h4>
|
||||
<p class="topless"><a href="{{ prev.link|e }}"
|
||||
title="{{ _('previous chapter') }}">{{ prev.title }}</a></p>
|
||||
<div>
|
||||
<h4>{{ _('Previous topic') }}</h4>
|
||||
<p class="topless"><a href="{{ prev.link|e }}"
|
||||
title="{{ _('previous chapter') }}">{{ prev.title }}</a></p>
|
||||
</div>
|
||||
{%- endif %}
|
||||
{%- if next %}
|
||||
<h4>{{ _('Next topic') }}</h4>
|
||||
<p class="topless"><a href="{{ next.link|e }}"
|
||||
title="{{ _('next chapter') }}">{{ next.title }}</a></p>
|
||||
<div>
|
||||
<h4>{{ _('Next topic') }}</h4>
|
||||
<p class="topless"><a href="{{ next.link|e }}"
|
||||
title="{{ _('next chapter') }}">{{ next.title }}</a></p>
|
||||
</div>
|
||||
{%- endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user