mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Close #6729: HTML theme: agogo theme now supports rightsidebar option
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -18,6 +18,7 @@ Features added
|
||||
|
||||
* #6707: C++, support bit-fields.
|
||||
* #267: html: Eliminate prompt characters of doctest block from copyable text
|
||||
* #6729: html theme: agogo theme now supports ``rightsidebar`` option
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
@@ -237,6 +237,8 @@ These themes are:
|
||||
- **documentwidth** (CSS length): Width of the document (without sidebar),
|
||||
default 50em.
|
||||
- **sidebarwidth** (CSS length): Width of the sidebar, default 20em.
|
||||
- **rightsidebar** (true or false): Put the sidebar on the right side.
|
||||
Defaults to ``True``.
|
||||
- **bgcolor** (CSS color): Background color.
|
||||
- **headerbg** (CSS value for "background"): background for the header area,
|
||||
default a grayish gradient.
|
||||
|
||||
@@ -33,15 +33,7 @@
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content-wrapper">
|
||||
<div class="content">
|
||||
<div class="document">
|
||||
{%- block document %}
|
||||
{{ super() }}
|
||||
{%- endblock %}
|
||||
</div>
|
||||
<div class="sidebar">
|
||||
{%- macro agogo_sidebar() %}
|
||||
{%- block sidebartoc %}
|
||||
<h3>{{ _('Table of Contents') }}</h3>
|
||||
{{ toctree() }}
|
||||
@@ -55,7 +47,26 @@
|
||||
</form>
|
||||
</div>
|
||||
{%- endblock %}
|
||||
{% endmacro %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content-wrapper">
|
||||
<div class="content">
|
||||
{%- if not theme_rightsidebar|tobool %}
|
||||
<div class="sidebar">
|
||||
{{ agogo_sidebar() }}
|
||||
</div>
|
||||
{%- endif %}
|
||||
<div class="document">
|
||||
{%- block document %}
|
||||
{{ super() }}
|
||||
{%- endblock %}
|
||||
</div>
|
||||
{%- if theme_rightsidebar|tobool %}
|
||||
<div class="sidebar">
|
||||
{{ agogo_sidebar() }}
|
||||
</div>
|
||||
{%- endif %}
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -175,7 +175,11 @@ div.document {
|
||||
}
|
||||
|
||||
div.body {
|
||||
{%- if theme_rightsidebar|tobool %}
|
||||
padding-right: 2em;
|
||||
{%- else %}
|
||||
padding-left: 2em;
|
||||
{% endif %}
|
||||
text-align: {{ theme_textalign }};
|
||||
}
|
||||
|
||||
@@ -270,7 +274,11 @@ div.document ol {
|
||||
|
||||
div.sidebar {
|
||||
width: {{ theme_sidebarwidth|todim }};
|
||||
{%- if theme_rightsidebar|tobool %}
|
||||
float: right;
|
||||
{%- else %}
|
||||
float: left;
|
||||
{%- endif %}
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ bodyfont = "Verdana", Arial, sans-serif
|
||||
headerfont = "Georgia", "Times New Roman", serif
|
||||
pagewidth = 70em
|
||||
documentwidth = 50em
|
||||
rightsidebar = true
|
||||
sidebarwidth = 20em
|
||||
bgcolor = #eeeeec
|
||||
headerbg = #555573 url(bgtop.png) top left repeat-x
|
||||
|
||||
Reference in New Issue
Block a user