/*
* ~~~~~~~~~~
*
* 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-2014 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');
// for some reason, the document has no sidebar; do not run into errors
// original margin-left of the bodywrapper and width of the sidebar
// with the sidebar expanded
// 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
function sidebar_is_collapsed() {
}
function toggle_sidebar() {
if (sidebar_is_collapsed())
else
}
function collapse_sidebar() {
'margin-left': '0',
});
}
function expand_sidebar() {
});
}
function add_sidebar_button() {
'float': 'left',
'margin-right': '0',
});
// create the button
'<div id="sidebarbutton"><span>«</span></div>'
);
var sidebarbutton = $('#sidebarbutton');
// find the height of the viewport to center the '<<' in the page
var viewport_height;
if (window.innerHeight)
else
'display': 'block',
});
'color': '#FFFFFF',
'font-size': '1.2em',
'cursor': 'pointer',
'padding-top': '1px',
});
function () {
},
function () {
}
);
}
function set_position_from_cookie() {
return;
if (key == 'sidebar') {
}
}
}
var sidebarbutton = $('#sidebarbutton');
});