Lines Matching full:sidebar
2 * sidebar.js
5 * This script makes the Sphinx sidebar collapsible and implements
10 * used to collapse and expand the sidebar.
12 * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
13 * and the width of the sidebar and the margin-left of the document
14 * are decreased. When the sidebar is expanded the opposite happens.
16 * remember the position of the sidebar among the pages.
32 var sidebar = $('.sphinxsidebar');
35 // original margin-left of the bodywrapper and width of the sidebar
36 // with the sidebar expanded
38 var ssb_width_expanded = sidebar.width();
40 // margin-left of the bodywrapper and width of the sidebar
41 // with the sidebar collapsed
65 // adjust the scrolling of the sidebar
71 sidebar.css('width', ssb_width_collapsed);
78 sidebarbutton.attr('title', _('Expand sidebar'));
79 document.cookie = 'sidebar=collapsed';
84 sidebar.css('width', ssb_width_expanded);
91 sidebarbutton.attr('title', _('Collapse sidebar'));
92 document.cookie = 'sidebar=expanded';
102 sidebar.append(
111 'margin-top': (viewport_height - sidebar.position().top - 20) / 2
115 sidebarbutton.attr('title', _('Collapse sidebar'));
143 if (key == 'sidebar') {
162 var offset = sidebar.position()['top'];
167 // does sidebar fit in window?
174 // no: only scroll if top/bottom edge of sidebar is at