diff options
author | Pauli Virtanen <pav@iki.fi> | 2013-05-01 16:50:04 +0300 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2013-05-01 16:50:04 +0300 |
commit | 4180ab31c647efc9499c553b4a22bf1857e04293 (patch) | |
tree | 067ac4aa78919101b2444e0d3af6613503c11cf9 | |
parent | eceaae57cbd1e1dad176812c7d8a843c2c36920e (diff) | |
download | scipy-sphinx-theme-4180ab31c647efc9499c553b4a22bf1857e04293.tar.gz |
ENH: add support for customized sidebar location
-rw-r--r-- | README.rst | 5 | ||||
-rw-r--r-- | _theme/scipy/layout.html | 12 | ||||
-rw-r--r-- | _theme/scipy/theme.conf | 1 |
3 files changed, 18 insertions, 0 deletions
@@ -21,6 +21,11 @@ configuration variable: breadcrumb list on the top left. You can override it by defining an `edit_link` block in ``searchbox.html``. +.. attribute:: sidebar + + One of ``"left"``, ``"right"``, ``"none"``. + Defines where the sidebar should appear. + The following blocks are defined: .. attribute:: searchbox.html:edit_link diff --git a/_theme/scipy/layout.html b/_theme/scipy/layout.html index ae02da6..a3b1d8d 100644 --- a/_theme/scipy/layout.html +++ b/_theme/scipy/layout.html @@ -176,8 +176,15 @@ <div class="container"> <div class="main"> <div class="row-fluid"> + {%- if theme_sidebar == 'left' -%} {{ sidebar() }} + {%- endif %} + {%- if theme_sidebar == 'none' -%} + <div class="span1"></div> + <div class="span10"> + {% else %} <div class="span9"> + {%- endif %} {%- block document %} <div class="bodywrapper"> <div class="body" id="spc-section-body"> @@ -186,6 +193,11 @@ </div> {%- endblock %} </div> + {%- if theme_sidebar == 'right' -%} + {{ sidebar() }} + {%- elif theme_sidebar == 'none' -%} + <div class="span1"></div> + {%- endif %} </div> </div> </div> diff --git a/_theme/scipy/theme.conf b/_theme/scipy/theme.conf index cc23dc8..3255db6 100644 --- a/_theme/scipy/theme.conf +++ b/_theme/scipy/theme.conf @@ -6,3 +6,4 @@ pygments_style = friendly [options] edit_link = false rootlinks = [] +sidebar = left |