Skip to content

Commit

Permalink
Close sphinx-doc#6729: HTML theme: agogo theme now supports rightside…
Browse files Browse the repository at this point in the history
…bar option
  • Loading branch information
tk0miya committed Oct 13, 2019
1 parent 2d609dd commit 2b33bba
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Features added
--------------

* #6707: C++, support bit-fields.
* #6729: HTML theme: agogo theme now supports ``rightsidebar`` option

Bugs fixed
----------
Expand Down
2 changes: 2 additions & 0 deletions doc/usage/theming.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions sphinx/themes/agogo/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
{% block content %}
<div class="content-wrapper">
<div class="content">
<div class="document">
{%- block document %}
{{ super() }}
{%- endblock %}
</div>
<div class="sidebar">
{%- block sidebartoc %}
<h3>{{ _('Table of Contents') }}</h3>
Expand All @@ -56,6 +51,11 @@ <h3 style="margin-top: 1.5em;">{{ _('Search') }}</h3>
</div>
{%- endblock %}
</div>
<div class="document">
{%- block document %}
{{ super() }}
{%- endblock %}
</div>
<div class="clearer"></div>
</div>
</div>
Expand Down
8 changes: 8 additions & 0 deletions sphinx/themes/agogo/static/agogo.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,11 @@ div.document {
}

div.body {
{%- if theme_rightsidebar|tobool %}
padding-right: 2em;
{%- else %}
padding-left: 2em;
{% endif %}
text-align: {{ theme_textalign }};
}

Expand Down Expand Up @@ -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;
}

Expand Down
1 change: 1 addition & 0 deletions sphinx/themes/agogo/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2b33bba

Please sign in to comment.