[IMP] doc: support disabling sidebar
This commit is contained in:
parent
2a2cbfc5ae
commit
2140ead305
|
@ -26,7 +26,7 @@
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{%- block content -%}
|
{%- block content -%}
|
||||||
<div class="document-super {% if meta is defined %}{{ meta.classes }}{% endif %}">
|
<div class="document-super {% if meta is defined %}{{ meta.classes }}{% endif %} {% if render_sidebar %}with-sidebar{% endif %}">
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
</div>
|
</div>
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
@ -34,6 +34,7 @@
|
||||||
{# sidebar to the left, except sidebar1 is *outside* div.document where
|
{# sidebar to the left, except sidebar1 is *outside* div.document where
|
||||||
sidebar2 is inside, so inject sidebar into document block #}
|
sidebar2 is inside, so inject sidebar into document block #}
|
||||||
{%- block document -%}
|
{%- block document -%}
|
||||||
|
{%- if render_sidebar -%}
|
||||||
<div class="sphinxsidebar">
|
<div class="sphinxsidebar">
|
||||||
<div class="sphinxsidebarwrapper">
|
<div class="sphinxsidebarwrapper">
|
||||||
{{ toctree(maxdepth=4, collapse=False, includehidden=True,
|
{{ toctree(maxdepth=4, collapse=False, includehidden=True,
|
||||||
|
@ -45,6 +46,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{%- endif -%}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
{%- block sidebar1 -%}{%- endblock -%}
|
{%- block sidebar1 -%}{%- endblock -%}
|
||||||
|
|
|
@ -6247,6 +6247,18 @@ body {
|
||||||
}
|
}
|
||||||
@media (min-width: 992px) {
|
@media (min-width: 992px) {
|
||||||
.documentwrapper {
|
.documentwrapper {
|
||||||
|
float: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.with-sidebar .documentwrapper {
|
||||||
|
position: relative;
|
||||||
|
min-height: 1px;
|
||||||
|
padding-left: 15px;
|
||||||
|
padding-right: 15px;
|
||||||
|
}
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.with-sidebar .documentwrapper {
|
||||||
float: left;
|
float: left;
|
||||||
width: 75%;
|
width: 75%;
|
||||||
}
|
}
|
||||||
|
@ -6611,6 +6623,9 @@ div.section > h2 {
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
.body {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
.body > .section > .section {
|
.body > .section > .section {
|
||||||
margin-bottom: 60px;
|
margin-bottom: 60px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,9 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.documentwrapper {
|
.documentwrapper {
|
||||||
|
.make-md-column(12);
|
||||||
|
}
|
||||||
|
.with-sidebar .documentwrapper {
|
||||||
.make-md-column(9);
|
.make-md-column(9);
|
||||||
}
|
}
|
||||||
.sphinxsidebar {
|
.sphinxsidebar {
|
||||||
|
@ -403,8 +406,12 @@ div.section > h2 {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
// ~docs-section
|
// ~docs-section
|
||||||
.body > .section > .section {
|
.body {
|
||||||
margin-bottom: 60px;
|
// otherwise main section right column content may not be visible
|
||||||
|
position: relative;
|
||||||
|
> .section > .section {
|
||||||
|
margin-bottom: 60px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.literal:extend(code) {}
|
.literal:extend(code) {}
|
||||||
|
|
Loading…
Reference in New Issue