Commits

hiteiteki committed 934d596

Fixed issues, moved the new theme folder to the right location.

  • Participants
  • Parent commits c17a93a

Comments (0)

Files changed (21)

 
 # The theme to use for HTML and HTML Help pages.  Major themes that come with
 # Sphinx are currently 'default' and 'sphinxdoc'.
-if os.environ['CUSTOM_THEME'] == 'orange_web_theme':
-    html_theme = 'orange_web_theme'
+if os.environ['SPHINX_HTML_THEME'] == 'orange_web_theme':
+    html_theme = os.environ['SPHINX_HTML_THEME']
 else:
     html_theme = 'orange_theme'
 
 # documentation.
 html_theme_options = {"collapsiblesidebar": "false"}
 
-if "orange" in html_theme:
+if 'orange' in html_theme:
     html_theme_options.update({"orangeheaderfooter": "false"})
 
 # Add any paths that contain custom themes here, relative to this directory.
 
 
 def construe_root_url(hostname='localhost', tls=False):
-    """Function for building root url of the site hosting the documentation"""
-    return 'http%s://%s' % ('s' if tls else '', hostname)
+    """Construe an url of the main webapp, which links to the documentation."""
+    return 'http{0}://{1}'.format('s' if tls else '', hostname)
 
-# A dictionary of values to pass into the template engine’s context for all pages. 
+# A dict of values to pass into the template engine’s context for all pages.
 html_context = {'root_url': construe_root_url('new.orange.biolab.si')}
 
 

docs/sphinx-ext/themes/orange_web_theme/footer.html

+<!-- ******FOOTER****** -->
+<footer class="footer">
+    <div class="container">
+        <small class="copyright pull-left">Copyright &copy; University of Ljubljana</small>
+        <ul class="links list-inline pull-right">
+            <li><a href="{{ root_url }}/contributing/">Contribute</a></li>
+            <li><a href="{{ root_url }}/license/">License</a></li>
+            <li><a href="{{ root_url }}/citation/">Citation</a></li>
+            <li><a href="{{ root_url }}/contact/">Contact</a></li>
+        </ul>
+    </div>
+</footer><!--//footer-->

docs/sphinx-ext/themes/orange_web_theme/header.html

+<header id="top" class="header navbar-fixed-top">
+    <div class="container">
+        <h1 class="logo pull-left">
+            <a href="{{ root_url }}"> <!-- http://new.orange.biolab.si -->
+                <img id="logo-image" class="logo-image" src="{{ pathto('_static/orange-logo-w.png', 1) }}" alt="Logo">
+            </a>
+        </h1><!--//logo-->
+        <nav id="main-nav" class="main-nav navbar-right" role="navigation">
+            <div class="navbar-header">
+                <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-collapse">
+                    <span class="sr-only">Toggle navigation</span>
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                </button><!--//nav-toggle-->
+            </div><!--//navbar-header-->
+            <div class="navbar-collapse collapse" id="navbar-collapse">
+                <ul class="nav navbar-nav">
+                    <li class="active nav-item sr-only"><a class="scrollto" href="#promo">Home</a></li>
+                    <li class="nav-item"><a href="{{ root_url }}">Home</a></li>
+                    <li class="nav-item"><a href="{{ root_url }}/screenshots/">Screenshots</a></li>
+                    <li class="nav-item"><a href="{{ root_url }}/download/">Download</a></li>
+                    <li class="nav-item"><a href="http://docs.orange.biolab.si">Docs</a></li> <!--http://docs.orange.biolab.si-->
+                    <li class="nav-item"><a href="{{ root_url }}/community/">Community</a></li>
+                </ul><!--//nav-->
+            </div><!--//navabr-collapse-->
+        </nav><!--//main-nav-->
+    </div>
+</header><!--//header-->

docs/sphinx-ext/themes/orange_web_theme/layout.html

+{% extends "basic/layout.html" %}
+
+{% block extrahead %}
+    <link rel="stylesheet" href="{{ root_url }}/static/plugins/bootstrap/css/bootstrap.min.css">
+    <link id="theme-style" rel="stylesheet" href="{{ root_url }}/static/css/styles.css">
+    <link id="theme-style" rel="stylesheet" href="{{ root_url }}/static/css/custom.css">
+{% endblock %}
+
+
+{% block header %}
+	{% include 'header.html' %}
+    <section id="features" class="features section custom-reduce-padding-2">
+        <div class="container">
+            <div class="row">
+                <div class="col-md-12 col-sm-12 col-xs-12">
+{% endblock %}
+
+
+{% block footer %}
+                </div>
+            </div><!--//row-->
+        </div><!--//container-->
+    </section><!--//features-->
+	{# {{ super() }} #}
+	{% include 'footer.html' %}
+    <script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>
+    <script type="text/javascript" src="{{ root_url }}/static/plugins/jquery-1.10.2.min.js"></script>
+    <script type="text/javascript" src="{{ root_url }}/static/plugins/bootstrap/js/bootstrap.min.js"></script>
+    <script type="text/javascript" src="{{ pathto('_static/custom.js', 1) }}"></script>
+{% endblock %}
+
+{% set rellinks = () %}
+{% set show_copyright = 0 %}
+{% set show_sphinx = 0 %}
+ 
+{% block relbar1 %}{% endblock %}
+{% block relbar2 %}  {% endblock %}
+
+{% block sidebar1 %} {% endblock %}
+{% block sidebar2 %} {% endblock %}

docs/sphinx-ext/themes/orange_web_theme/page.html

+{% extends "basic/page.html" %}
+
+{% block body %}
+    {{ super() }}
+{% endblock %} 

docs/sphinx-ext/themes/orange_web_theme/static/copybutton.js

+$(document).ready(function() {
+    /* Add a [>>>] button on the top-right corner of code samples to hide
+     * the >>> and ... prompts and the output and thus make the code
+     * copyable. */
+    var div = $('.highlight-python .highlight,' +
+                '.highlight-python3 .highlight')
+    var pre = div.find('pre');
+
+    // get the styles from the current theme
+    var hide_text = 'Hide the prompts and output';
+    var show_text = 'Show the prompts and output';
+    var border_width = pre.css('border-top-width');
+    var border_style = pre.css('border-top-style');
+    var border_color = pre.css('border-top-color');
+    var button_styles = {
+        'cursor':'pointer', 'float': 'right', 'margin-top': '-6px', 'margin-right': '-5px',
+        'border-color': border_color, 'border-style': border_style,
+        'border-width': border_width, 'color': border_color, 'text-size': '75%',
+        'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em'
+    }
+
+    // create and add the button to all the code blocks that contain >>>
+    div.each(function(index) {
+        var jthis = $(this);
+        if (jthis.find('.gp').length > 0) {
+            var button = $('<span class="copybutton">&gt;&gt;&gt;</span>');
+            button.css(button_styles)
+            button.attr('title', hide_text);
+            jthis.find('pre').prepend(button);
+        }
+        // tracebacks (.gt) contain bare text elements that need to be
+        // wrapped in a span to work with .nextUntil() (see later)
+        jthis.find('pre:has(.gt)').contents().filter(function() {
+            return ((this.nodeType == 3) && (this.data.trim().length > 0));
+        }).wrap('<span>');
+    });
+
+    // define the behavior of the button when it's clicked
+    $('.copybutton').toggle(
+        function() {
+            var button = $(this);
+            button.parent().find('.go, .gp, .gt').hide();
+            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden');
+            button.css('text-decoration', 'line-through');
+            button.attr('title', show_text);
+        },
+        function() {
+            var button = $(this);
+            button.parent().find('.go, .gp, .gt').show();
+            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible');
+            button.css('text-decoration', 'none');
+            button.attr('title', hide_text);
+        });
+});
+

docs/sphinx-ext/themes/orange_web_theme/static/custom.js

+/* ======= Documentation js modifications ======= */
+jQuery(document).ready(function($) {
+    $('a em').contents().unwrap();
+    $('h2').first().addClass('title');
+
+    /* Jump function. TODO: Test with a domain URL */
+    $('a[href*=#]').click(function() {
+        if (location.pathname.replace(/^.*\//,'') == this.pathname.replace(/^.*\//,'')
+            && location.hostname == this.hostname) {
+                var $target = $(this.hash);
+                $target = $target.length && $target || $('#' + this.hash.slice(1).replace(/\./g,'\\.'));
+                var targetOffset = $target.offset().top - $('header#top').outerHeight(true) - 80;
+                $('html,body').animate({scrollTop: targetOffset}, 100);
+        }
+    });
+});

docs/sphinx-ext/themes/orange_web_theme/static/images/1.png

Added
New image

docs/sphinx-ext/themes/orange_web_theme/static/images/10.png

Added
New image

docs/sphinx-ext/themes/orange_web_theme/static/images/2.png

Added
New image

docs/sphinx-ext/themes/orange_web_theme/static/images/3.png

Added
New image

docs/sphinx-ext/themes/orange_web_theme/static/images/4.png

Added
New image

docs/sphinx-ext/themes/orange_web_theme/static/images/5.png

Added
New image

docs/sphinx-ext/themes/orange_web_theme/static/images/6.png

Added
New image

docs/sphinx-ext/themes/orange_web_theme/static/images/7.png

Added
New image

docs/sphinx-ext/themes/orange_web_theme/static/images/8.png

Added
New image

docs/sphinx-ext/themes/orange_web_theme/static/images/9.png

Added
New image

docs/sphinx-ext/themes/orange_web_theme/static/orange-logo-w.png

Added
New image

docs/sphinx-ext/themes/orange_web_theme/static/orange.css

+@import url("basic.css");
+
+/* http://colorschemedesigner.com/#0G21Tw0w0w0w0 */
+
+body {
+}
+
+div#container
+{
+    margin-left: auto;
+    margin-right: auto;
+    width: 830px;
+    text-align: left;
+}
+
+div.border1 {
+    background-color: #ffece3;
+    height: 1px;
+    margin-left:3px;
+    margin-right:3px;
+}
+
+div.border2 {
+    background-color: #ffece3;
+    height: 1px;
+    margin-left: 1px;
+    margin-right: 1px;
+}
+
+div.borderv {
+    background-color:#ffece3;
+    padding-left: 2px;
+    padding-right: 2px;
+}
+
+div#header {
+    background-color: #fcfcfc;
+}
+
+div#footerinner {
+    background-color: #fcfcfc;
+}
+
+div#header {
+    height: 70px;
+    padding-top:20px;
+}
+
+#header h1 {
+    margin: 0;
+    font-size: 1px;
+}
+
+div#orangeimg {
+    float: left;
+	z-index:20;
+	position: relative;
+}
+
+
+div#orangeimg img {
+    border:none;
+	margin-left: 10px;
+	margin-right: 10px;
+}
+
+#cse-search-box {
+    text-align: right;
+    margin-bottom: 16px;
+}
+
+form#search-box {
+    text-align: right;
+	margin-bottom: 16px;
+}
+
+div#underimg {
+	border-bottom: 2px #ffcbaf solid;
+    z-index: 10;
+	position: relative;
+	height: 1px;
+	margin-left: 10px;
+	margin-right: 10px;
+	margin-bottom: 3px;
+}
+
+table#uplinks  {
+   margin-left:auto;
+   padding-right: 12px;
+   padding-bottom: 1px;
+}
+
+table#uplinks td {
+   text-align: right;
+   padding-left: 20px;
+   font-size: 12px;
+   font-weight: normal;
+}
+
+table#uplinks2  {
+   margin-left:auto;
+   padding-right: 0;
+   padding-bottom: 1px;
+   margin-bottom: -10px;
+   margin-top: -5px;
+}
+
+table#uplinks2 td {
+   text-align: right;
+   padding-left: 20px;
+   font-size: 12px;
+   /*font-weight: bold; */
+}
+
+div.related {
+    background-color: #f8f8f8;
+    line-height: 30px;
+    color: #000000;
+    text-align: left;
+    font-size: 12px;
+    border-bottom: 1px solid #FFECE3;
+    border-top: 1px solid #FFECE3;
+}
+
+div.related:first-child {
+    border-bottom: 1px solid #FFECE3;
+}
+
+div.body p {
+    margin-top: 10px;
+    text-align: left;
+}
+
+div#main, div#footer {
+    float: none;
+	margin-top: 8px;
+}
+
+div#maininner {
+	background-color: white;
+	padding: 5px 20px 20px;
+}
+
+div#footerinner {
+	padding: 5px;
+}
+
+div#footerinner table {
+    width: 100%;
+}
+
+div#footerinner table tr {
+	padding-top: 0;
+	margin-top: 0;
+}
+
+div#footerinner table td {
+	line-height: 18px;
+	padding-left: 10px;
+	padding-right: 10px;
+	vertical-align: top;
+}
+
+div#footerinner table td p {
+	margin: 0;
+	border-bottom: solid 2px #ffcbaf;
+
+}
+
+div#footerinner table td p a {
+	font-weight: bold;
+}
+
+#img-snap {
+  width: 400px;
+  margin-right: 30px;
+  margin-left: 20px;
+  margin-top: 40px;
+}
+
+.intro {
+  font-size: 13px;
+  line-height: 24px;
+  position: relative;
+  font-weight: bold;
+  margin-top: 40px
+}
+
+.intro-big {
+  font-size: 16px;
+}
+
+p#latest-header {
+  margin-top: 80px;
+  padding-left: 3px;
+  border-bottom: 2px #ffcbaf solid;
+  font-weight: bold;
+}
+
+table#latest img {
+  padding-right: 5px;
+}
+
+table#latest a {
+  padding-left: 10px;
+}
+
+table#latest tr td {
+  padding-bottom: 5px;
+  vertical-align: top;
+}
+
+p.rubric  {
+    font-family: inherit;
+    background-color: inherit;
+    color: inherit;
+    border-bottom: 1px solid #ccc;
+    margin: 30px 0 5px 0;
+    padding: 1px 0 1px 3px;
+}
+
+tt {
+    font-size: 13px;
+}
+
+h2.title > tt {
+    font-size: 0.9em;
+}
+
+h3 > tt {
+    margin-left: 5px;
+    font-size: 0.9em;
+}
+
+tt.descname {
+    margin-bottom: 0;
+    font-size: 13px;
+}
+
+table.field-list th.field-name {
+    font-weight: normal;
+}
+
+table.field-list td.field-body tt.xref {
+    font-weight: normal;
+}
+
+
+dl.class > dt, dl.attribute > dt {
+    font-size: 13px;
+    font-weight: bold;
+    margin-bottom: 10px;
+    margin-top: 20px;
+    border-bottom: 1px solid #e0e0e0;
+    font-style: normal;
+}
+
+dl.class > dt {
+    line-height: 180%;
+    text-indent: -30px;
+    padding-left: 30px;
+}
+
+dl.class > dt > em, dl.class > dt tt {
+    font-style: normal;
+    font-family: Verdana, Arial;
+}
+
+dl.class > dt > em {
+    font-weight: normal;
+}
+
+dl.class > dt > em.property {
+    font-weight: bold;
+}
+
+dl.class dt > tt.descclassname {
+/*    color: #777;*/
+    font-weight: normal;
+    font-size: 14px;
+}
+
+dl.class > dt big, dl.class > dt .optional {
+    font-size: inherit;
+    font-weight: normal;
+}
+
+div.body h1 {
+    background-color: #ff8e00; /*#fe6612;*/ border-bottom: 2px #fe6612 solid;
+}
+
+P.section { font-weight: bold }
+
+DL.attributes DT { font-family: monospace; font-weight: bold; margin-top: 1em }
+
+DL.attributes P { margin-top: 0; margin-bottom: 0}
+
+DL.attributes DT.notcode {  }
+
+DL.attributes P.header { margin-bottom: 0; margin-top: 1em}
+
+P.header {
+  margin-bottom: 0;
+  margin-top: 1em;
+  font-weight: bold;
+  font-size: 11px;
+ }
+
+XMP.code, PRE.code {
+  background-color: #36D88A; /*#FFFFE8;*/
+  margin-top: 3px;
+  border-left: thin dotted #f69810;
+  padding-left: 3px;
+}
+
+pre {
+    padding: 5px 5px 15px;
+    background-color: #f8f9f5; /*#ecefe5; #eeffcc;*/
+    color: #333333;
+    line-height: 120%;
+    border: 1px solid #ac9;
+    border-left: none;
+    border-right: none;
+    text-align: left;
+}
+
+div.footer {
+    text-align: right;
+}
+
+div.note {
+    margin: 20px 0;
+    padding-bottom: 0;
+}
+
+/* -- sidebar --------------------------------------------------------------- */
+
+div.sphinxsidebarwrapper {
+    padding: 2px 10px 0 10px;
+    border: 1px solid #e8e8e8;
+    border-radius: 3px;
+    background-color: #f8f8f8;
+    margin: 10px 0 20px 20px;
+}
+
+div.sphinxsidebar ul {
+    padding-left: 0;
+}
+
+div.sphinxsidebarwrapper h3 {
+    margin-top: 5px !important;
+}
+
+div.sphinxsidebar {
+    font-size: 90%;
+    margin-left: 0;
+    margin-top: 0;
+    padding: 0 0 10px 30px;
+    text-align: left;
+    z-index: 10;
+    background-color: white;
+    float: right;
+    width: 250px;
+}
+
+div.sphinxsidebar ul {
+    list-style: none;
+    padding-left: 15px;
+}
+
+div.sphinxsidebarwrapper > ul {
+    padding-left: 0;
+}
+
+div.sphinxsidebarwrapper > ul > li > a {
+    font-weight: normal;
+    font-size: 13px;
+}
+
+div.sphinxsidebar ul ul,
+div.sphinxsidebar ul.want-points {
+    margin-left: 5px;
+    list-style: square;
+}
+
+div.sphinxsidebar ul ul {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+div.sphinxsidebar form {
+    margin-top: 10px;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #e0e0e0;
+    font-family: sans-serif;
+    font-size: 13px;
+}
+
+div.sphinxsidebar h3 a {
+    color: #2F31FF;
+}
+
+img {
+    border: 0;
+	max-width: 100%;
+}
+
+div#sidebarbutton {
+    background-color: #EEEEEE;
+    color: black;
+    border-left: 1px solid #FFECE3;
+    border-right: 1px solid #FFECE3;
+    font-size: 1.2em;
+    cursor: pointer;
+    padding-top: 1px;
+    width: 10px;
+}
+
+div #sidebarbutton:hover {
+	background-color: #CCCCCC;
+}
+
+table.field-list td, table.field-list th {
+    border-bottom: 1px solid #e0e0e0;
+    border-top: 1px solid #e0e0e0;
+}
+
+table.field-list th.field-name {
+    background-color: #f8f8f8;
+    border-right: 1px solid #e8e8e8 !important;
+}
+
+table.docutils {
+    border-color: #E8E8E8;
+    width: 100%;
+}
+
+table.field-list td,
+table.field-list th {
+    padding: 5px;
+}
+
+img.image-float-left {
+	float:left;
+}
+
+/* Lists for channel signals */
+
+.signal-list {
+    padding-left: 20px;
+}
+
+dd {
+    margin-left: 0;
+}
+
+/* Stamped lists for enumerated descriptions of widgets */
+
+.stamp-list {
+    padding-left:20px;
+}
+
+.stamp-list li:nth-child(1) {
+	list-style-image: url(./images/1.png);
+}
+
+.stamp-list li:nth-child(2) {
+	list-style-image: url(./images/2.png)
+}
+
+.stamp-list li:nth-child(3) {
+	list-style-image: url(./images/3.png)
+}
+
+.stamp-list li:nth-child(4) {
+	list-style-image: url(./images/4.png)
+}
+
+.stamp-list li:nth-child(5) {
+	list-style-image: url(./images/5.png)
+}
+
+.stamp-list li:nth-child(6) {
+	list-style-image: url(./images/6.png)
+}
+
+.stamp-list li:nth-child(7) {
+	list-style-image: url(./images/7.png)
+}
+
+.stamp-list li:nth-child(8) {
+	list-style-image: url(./images/8.png)
+}
+
+.stamp-list li:nth-child(9) {
+	list-style-image: url(./images/9.png)
+}
+
+.stamp-list li:nth-child(10) {
+	list-style-image: url(./images/10.png)
+}
+
+table.widget-catalog-table {
+    background-color: #FBFBFB;
+    border: 1px solid #E8E8E8;
+}
+
+table.widget-catalog-table td {
+    text-align: center;
+    border-bottom: 1px solid #E8E8E8;
+}
+
+table.widget-catalog-table td a img,
+table.widget-catalog-table td a object {
+    margin-left: auto;
+    margin-right: auto;
+    display: block;
+}
+
+table.widget-catalog-table td a,
+table.widget-catalog-table td cite {
+    display: block;
+}
+
+/* code fragments */
+div.highlight {
+    /* Needs to clear the floating sidebar */
+    clear: both;
+}
+
+/* Widget icon styling */
+table.widget-catalog-table img,
+img.widget-icon,
+table.widget-catalog-table object,
+object.widget-icon {
+    border-radius: 100%;
+    padding: 6px;
+    box-shadow: 0 0 5px #888888;
+}
+
+img.widget-icon,
+object.widget-icon {
+    height: 48px;
+    width: 48px;
+}
+
+/* Data */
+table.widget-catalog-table.widget-category-data img,
+img.widget-category-data.widget-icon,
+table.widget-catalog-table.widget-category-data object,
+object.widget-category-data.widget-icon {
+    background: #FFD39F;
+    background: radial-gradient(#FFDEB7 0%, #FFDCB5 50%, #FFC178 100%);
+}
+
+/* Visualize */
+table.widget-catalog-table.widget-category-visualize img,
+img.widget-category-visualize.widget-icon,
+table.widget-catalog-table.widget-category-visualize object,
+object.widget-category-visualize.widget-icon {
+    background: #FFB7B1;
+    background: radial-gradient(#FFC9C5 0%, #FFC9C5 50%, #FF9991 100%);
+}
+
+/* Classify */
+table.widget-catalog-table.widget-category-classify img,
+img.widget-category-classify.widget-icon,
+table.widget-catalog-table.widget-category-classify object,
+object.widget-category-classify.widget-icon {
+    background: #FAC1D9;
+    background: radial-gradient(#FAD0E2 0%, #FAD0E2 50%, #FAA8CA 100%);
+}
+
+/* Regression */
+table.widget-catalog-table.widget-category-regression img,
+img.widget-category-regression.widget-icon,
+table.widget-catalog-table.widget-category-regression object,
+object.widget-category-regression.widget-icon {
+    background: #E5BBFB;
+    background: radial-gradient(#EBCBFB 0%, #EBCBFB 50%, #DB9FFB 100%);
+}
+
+/* Evaluate */
+table.widget-catalog-table.widget-category-evaluate img,
+img.widget-category-evaluate.widget-icon,
+table.widget-catalog-table.widget-category-evaluate object,
+object.widget-category-evaluate.widget-icon {
+    background: #C3F3F3;
+    background: radial-gradient(#CFF3F3 0%, #CFF3F3 50%, #ADF3F3 100%);
+}
+
+/* Associate */
+table.widget-catalog-table.widget-category-associate img,
+img.widget-category-associate.widget-icon,
+table.widget-catalog-table.widget-category-associate object,
+object.widget-category-associate.widget-icon {
+    background: #ACE3CE;
+    background: radial-gradient(#BAE3D4 0%, #BAE3D4 50%, #95E3C5 100%);
+}
+
+/* Unsupervised */
+table.widget-catalog-table.widget-category-unsupervised img,
+img.widget-category-unsupervised.widget-icon,
+table.widget-catalog-table.widget-category-unsupervised object,
+object.widget-category-unsupervised.widget-icon {
+    background: #CAE1EF;
+    background: radial-gradient(#D4E5EF 0%, #D4E5EF 50%, #BBD8E9 100%);
+}

docs/sphinx-ext/themes/orange_web_theme/static/sidebar.js

+/*
+ * sidebar.js
+ * ~~~~~~~~~~
+ *
+ * This script makes the Sphinx sidebar collapsible.
+ *
+ * .sphinxsidebar contains .sphinxsidebarwrapper.  This script adds
+ * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
+ * used to collapse and expand the sidebar.
+ *
+ * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
+ * and the width of the sidebar and the margin-left of the document
+ * are decreased. When the sidebar is expanded the opposite happens.
+ * This script saves a per-browser/per-session cookie used to
+ * remember the position of the sidebar among the pages.
+ * Once the browser is closed the cookie is deleted and the position
+ * reset to the default (expanded).
+ *
+ * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+$(function() {
+  // global elements used by the functions.
+  // the 'sidebarbutton' element is defined as global after its
+  // creation, in the add_sidebar_button function
+  var bodywrapper = $('.bodywrapper');
+  var sidebar = $('.sphinxsidebar');
+  var sidebarwrapper = $('.sphinxsidebarwrapper');
+
+  // original margin-left of the bodywrapper and width of the sidebar
+  // with the sidebar expanded
+  var bw_margin_expanded = bodywrapper.css('margin-left');
+  var ssb_width_expanded = sidebar.width();
+
+  // margin-left of the bodywrapper and width of the sidebar
+  // with the sidebar collapsed
+  var bw_margin_collapsed = '.8em';
+  var ssb_width_collapsed = '.8em';
+
+  // colors used by the current theme
+  //var dark_color = $('.related').css('background-color');
+  //var light_color = $('.document').css('background-color');
+
+  function sidebar_is_collapsed() {
+    return sidebarwrapper.is(':not(:visible)');
+  }
+
+  function toggle_sidebar() {
+    if (sidebar_is_collapsed())
+      expand_sidebar();
+    else
+      collapse_sidebar();
+  }
+
+  function collapse_sidebar() {
+    if (!sidebar_is_collapsed()){
+      sidebarwrapper.hide();
+      sidebar.css('width', ssb_width_collapsed);
+      bodywrapper.css('margin-left', bw_margin_collapsed);
+      sidebarbutton.css({
+            'margin-left': '0',
+            'height': sidebar.height()
+      });
+      sidebarbutton.addClass("collapsed");
+      sidebarbutton.find('span').text('»');
+      sidebarbutton.attr('title', _('Expand sidebar'));
+      document.cookie = 'sidebar=collapsed';
+    }
+  }
+
+  function expand_sidebar() {
+    if (sidebar_is_collapsed()){
+        bodywrapper.css('margin-left', bw_margin_expanded);
+        sidebar.css('width', ssb_width_expanded);
+        sidebarwrapper.show();
+        sidebarbutton.css({
+            'margin-left': ssb_width_expanded-12,
+            'height': sidebarwrapper.height()
+        });
+        sidebarbutton.removeClass("collapsed")
+        sidebarbutton.find('span').text('«');
+        sidebarbutton.attr('title', _('Collapse sidebar'));
+        document.cookie = 'sidebar=expanded';
+    }
+  }
+
+  function add_sidebar_button() {
+    sidebarwrapper.css({
+        'float': 'left',
+        'margin-right': '0',
+        'width': ssb_width_expanded - 28
+    });
+    // create the button
+    sidebar.append(
+        '<div id="sidebarbutton"><span>&laquo;</span></div>'
+    );
+    var sidebarbutton = $('#sidebarbutton');
+    light_color = sidebarbutton.css('background-color');
+    // find the height of the sidebar to center the '<<' in the page
+    sidebarbutton.find('span').css({
+        'display': 'block',
+        'margin-top': (sidebar.height() - 20) / 2
+    });
+    
+    sidebarbutton.mouseover(expand_sidebar)
+    //sidebarwrapper.mouseout(collapse_sidebar)
+    bodywrapper.mouseover(collapse_sidebar)
+
+    sidebarbutton.click(toggle_sidebar);
+    sidebarbutton.attr('title', _('Collapse sidebar'));
+    /*sidebarbutton.css({
+        'color': '#FFFFFF',
+        'border-left': '1px solid ' + dark_color,
+        'font-size': '1.2em',
+        'cursor': 'pointer',
+        'height': bodywrapper.height(),
+        'padding-top': '1px',
+        'margin-left': ssb_width_expanded - 12
+    });
+
+    sidebarbutton.hover(
+      function () {
+          $(this).css('background-color', dark_color);
+      },
+      function () {
+          $(this).css('background-color', light_color);
+      }
+    );*/
+    sidebarbutton.css({
+        'height': sidebar.height(),
+        'margin-left': ssb_width_expanded - 12
+    });
+  }
+
+  function set_position_from_cookie() {
+    if (!document.cookie)
+      return;
+    var items = document.cookie.split(';');
+    for(var k=0; k<items.length; k++) {
+      var key_val = items[k].split('=');
+      var key = key_val[0];
+      if (key == 'sidebar') {
+        var value = key_val[1];
+        if ((value == 'collapsed') && (!sidebar_is_collapsed()))
+          collapse_sidebar();
+        else if ((value == 'expanded') && (sidebar_is_collapsed()))
+          expand_sidebar();
+      }
+    }
+  }
+
+  add_sidebar_button();
+  var sidebarbutton = $('#sidebarbutton');
+  set_position_from_cookie();
+});

docs/sphinx-ext/themes/orange_web_theme/theme.conf

+[theme]
+inherit = traditional
+stylesheet = orange.css
+
+[options]
+collapsiblesidebar = false
+orangeheaderfooter = true
+
+footerbgcolor = inherit
+footertextcolor = inherit
+sidebarbgcolor = inherit
+sidebarbtncolor = #f0f0f0
+sidebartextcolor = black 
+sidebarlinkcolor = #2F31FF 
+relbarbgcolor = #F0F0F0
+relbartextcolor = inherit
+relbarlinkcolor = #2F31FF 
+bgcolor = inherit 
+textcolor = inherit
+linkcolor = inherit
+visitedlinkcolor = inherit
+headbgcolor = inherit
+headtextcolor = inherit
+headlinkcolor = inherit
+codebgcolor = inherit
+codetextcolor = inherit
+bodyfont = Verdana,Arial
+headfont = inherit