Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 87b3caf

Browse files
committed
merge with 3.2
2 parents 09d7126 + d34fc8b commit 87b3caf

3 files changed

Lines changed: 348 additions & 0 deletions

File tree

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
@import url("default.css");
2+
3+
body {
4+
background-color: white;
5+
margin-left: 1em;
6+
margin-right: 1em;
7+
}
8+
9+
div.related {
10+
margin-bottom: 1.2em;
11+
padding: 0.5em 0;
12+
border-top: 1px solid #ccc;
13+
margin-top: 0.5em;
14+
}
15+
16+
div.related a:hover {
17+
color: #0095C4;
18+
}
19+
20+
div.related:first-child {
21+
border-top: 0;
22+
border-bottom: 1px solid #ccc;
23+
}
24+
25+
div.sphinxsidebar {
26+
background-color: #eeeeee;
27+
border-radius: 5px;
28+
line-height: 130%;
29+
font-size: smaller;
30+
}
31+
32+
div.sphinxsidebar h3, div.sphinxsidebar h4 {
33+
margin-top: 1.5em;
34+
}
35+
36+
div.sphinxsidebarwrapper > h3:first-child {
37+
margin-top: 0.2em;
38+
}
39+
40+
div.sphinxsidebarwrapper > ul > li > ul > li {
41+
margin-bottom: 0.4em;
42+
}
43+
44+
div.sphinxsidebar a:hover {
45+
color: #0095C4;
46+
}
47+
48+
div.sphinxsidebar input {
49+
font-family: 'Lucida Grande',Arial,sans-serif;
50+
border: 1px solid #999999;
51+
font-size: smaller;
52+
border-radius: 3px;
53+
}
54+
55+
div.sphinxsidebar input[type=text] {
56+
max-width: 150px;
57+
}
58+
59+
div.body {
60+
padding: 0 0 0 1.2em;
61+
}
62+
63+
div.body p {
64+
line-height: 140%;
65+
}
66+
67+
div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 {
68+
margin: 0;
69+
border: 0;
70+
padding: 0.3em 0;
71+
}
72+
73+
div.body hr {
74+
border: 0;
75+
background-color: #ccc;
76+
height: 1px;
77+
}
78+
79+
div.body pre {
80+
border-radius: 3px;
81+
border: 1px solid #ac9;
82+
}
83+
84+
div.body div.admonition, div.body div.impl-detail {
85+
border-radius: 3px;
86+
}
87+
88+
div.body div.impl-detail > p {
89+
margin: 0;
90+
}
91+
92+
div.body div.seealso {
93+
border: 1px solid #dddd66;
94+
}
95+
96+
div.body a {
97+
color: #00608f;
98+
}
99+
100+
div.body a:visited {
101+
color: #30306f;
102+
}
103+
104+
div.body a:hover {
105+
color: #00B0E4;
106+
}
107+
108+
tt, pre {
109+
font-family: monospace, sans-serif;
110+
font-size: 96.5%;
111+
}
112+
113+
div.body tt {
114+
border-radius: 3px;
115+
}
116+
117+
div.body tt.descname {
118+
font-size: 120%;
119+
}
120+
121+
div.body tt.xref, div.body a tt {
122+
font-weight: normal;
123+
}
124+
125+
p.deprecated {
126+
border-radius: 3px;
127+
}
128+
129+
table.docutils {
130+
border: 1px solid #ddd;
131+
min-width: 20%;
132+
border-radius: 3px;
133+
margin-top: 10px;
134+
margin-bottom: 10px;
135+
}
136+
137+
table.docutils td, table.docutils th {
138+
border: 1px solid #ddd !important;
139+
border-radius: 3px;
140+
}
141+
142+
table p, table li {
143+
text-align: left !important;
144+
}
145+
146+
table.docutils th {
147+
background-color: #eee;
148+
padding: 0.3em 0.5em;
149+
}
150+
151+
table.docutils td {
152+
background-color: white;
153+
padding: 0.3em 0.5em;
154+
}
155+
156+
table.footnote, table.footnote td {
157+
border: 0 !important;
158+
}
159+
160+
div.footer {
161+
line-height: 150%;
162+
margin-top: -2em;
163+
text-align: right;
164+
width: auto;
165+
margin-right: 10px;
166+
}
167+
168+
div.footer a:hover {
169+
color: #0095C4;
170+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[theme]
2+
inherit = default
3+
stylesheet = pydoctheme.css
4+
pygments_style = sphinx
5+
6+
[options]
7+
bodyfont = 'Lucida Grande', Arial, sans-serif
8+
headfont = 'Lucida Grande', Arial, sans-serif
9+
footerbgcolor = white
10+
footertextcolor = #555555
11+
relbarbgcolor = white
12+
relbartextcolor = #666666
13+
relbarlinkcolor = #444444
14+
sidebarbgcolor = white
15+
sidebartextcolor = #444444
16+
sidebarlinkcolor = #444444
17+
bgcolor = white
18+
textcolor = #222222
19+
linkcolor = #0090c0
20+
visitedlinkcolor = #00608f
21+
headtextcolor = #1a1a1a
22+
headbgcolor = white
23+
headlinkcolor = #aaaaaa
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
/*
2+
* sidebar.js
3+
* ~~~~~~~~~~
4+
*
5+
* This script makes the Sphinx sidebar collapsible.
6+
*
7+
* .sphinxsidebar contains .sphinxsidebarwrapper. This script adds in
8+
* .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton used to
9+
* collapse and expand the sidebar.
10+
*
11+
* When the sidebar is collapsed the .sphinxsidebarwrapper is hidden and the
12+
* width of the sidebar and the margin-left of the document are decreased.
13+
* When the sidebar is expanded the opposite happens. This script saves a
14+
* per-browser/per-session cookie used to remember the position of the sidebar
15+
* among the pages. Once the browser is closed the cookie is deleted and the
16+
* position reset to the default (expanded).
17+
*
18+
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
19+
* :license: BSD, see LICENSE for details.
20+
*
21+
*/
22+
23+
$(function() {
24+
// global elements used by the functions.
25+
// the 'sidebarbutton' element is defined as global after its
26+
// creation, in the add_sidebar_button function
27+
var bodywrapper = $('.bodywrapper');
28+
var sidebar = $('.sphinxsidebar');
29+
var sidebarwrapper = $('.sphinxsidebarwrapper');
30+
31+
// original margin-left of the bodywrapper and width of the sidebar
32+
// with the sidebar expanded
33+
var bw_margin_expanded = bodywrapper.css('margin-left');
34+
var ssb_width_expanded = sidebar.width();
35+
36+
// margin-left of the bodywrapper and width of the sidebar
37+
// with the sidebar collapsed
38+
var bw_margin_collapsed = '.8em';
39+
var ssb_width_collapsed = '.8em';
40+
41+
// colors used by the current theme
42+
var dark_color = '#AAAAAA';
43+
var light_color = '#CCCCCC';
44+
45+
function sidebar_is_collapsed() {
46+
return sidebarwrapper.is(':not(:visible)');
47+
}
48+
49+
function toggle_sidebar() {
50+
if (sidebar_is_collapsed())
51+
expand_sidebar();
52+
else
53+
collapse_sidebar();
54+
}
55+
56+
function collapse_sidebar() {
57+
sidebarwrapper.hide();
58+
sidebar.css('width', ssb_width_collapsed);
59+
bodywrapper.css('margin-left', bw_margin_collapsed);
60+
sidebarbutton.css({
61+
'margin-left': '0',
62+
'height': bodywrapper.height(),
63+
'border-radius': '5px'
64+
});
65+
sidebarbutton.find('span').text('»');
66+
sidebarbutton.attr('title', _('Expand sidebar'));
67+
document.cookie = 'sidebar=collapsed';
68+
}
69+
70+
function expand_sidebar() {
71+
bodywrapper.css('margin-left', bw_margin_expanded);
72+
sidebar.css('width', ssb_width_expanded);
73+
sidebarwrapper.show();
74+
sidebarbutton.css({
75+
'margin-left': ssb_width_expanded-12,
76+
'height': bodywrapper.height(),
77+
'border-radius': '0 5px 5px 0'
78+
});
79+
sidebarbutton.find('span').text('«');
80+
sidebarbutton.attr('title', _('Collapse sidebar'));
81+
//sidebarwrapper.css({'padding-top':
82+
// Math.max(window.pageYOffset - sidebarwrapper.offset().top, 10)});
83+
document.cookie = 'sidebar=expanded';
84+
}
85+
86+
function add_sidebar_button() {
87+
sidebarwrapper.css({
88+
'float': 'left',
89+
'margin-right': '0',
90+
'width': ssb_width_expanded - 28
91+
});
92+
// create the button
93+
sidebar.append(
94+
'<div id="sidebarbutton"><span>&laquo;</span></div>'
95+
);
96+
var sidebarbutton = $('#sidebarbutton');
97+
// find the height of the viewport to center the '<<' in the page
98+
var viewport_height;
99+
if (window.innerHeight)
100+
viewport_height = window.innerHeight;
101+
else
102+
viewport_height = $(window).height();
103+
var sidebar_offset = sidebar.offset().top;
104+
var sidebar_height = Math.max(bodywrapper.height(), sidebar.height());
105+
sidebarbutton.find('span').css({
106+
'display': 'block',
107+
'position': 'fixed',
108+
'top': Math.min(viewport_height/2, sidebar_height/2 + sidebar_offset) - 10
109+
});
110+
111+
sidebarbutton.click(toggle_sidebar);
112+
sidebarbutton.attr('title', _('Collapse sidebar'));
113+
sidebarbutton.css({
114+
'border-radius': '0 5px 5px 0',
115+
'color': '#444444',
116+
'background-color': '#CCCCCC',
117+
'font-size': '1.2em',
118+
'cursor': 'pointer',
119+
'height': sidebar_height,
120+
'padding-top': '1px',
121+
'padding-left': '1px',
122+
'margin-left': ssb_width_expanded - 12
123+
});
124+
125+
sidebarbutton.hover(
126+
function () {
127+
$(this).css('background-color', dark_color);
128+
},
129+
function () {
130+
$(this).css('background-color', light_color);
131+
}
132+
);
133+
}
134+
135+
function set_position_from_cookie() {
136+
if (!document.cookie)
137+
return;
138+
var items = document.cookie.split(';');
139+
for(var k=0; k<items.length; k++) {
140+
var key_val = items[k].split('=');
141+
var key = key_val[0];
142+
if (key == 'sidebar') {
143+
var value = key_val[1];
144+
if ((value == 'collapsed') && (!sidebar_is_collapsed()))
145+
collapse_sidebar();
146+
else if ((value == 'expanded') && (sidebar_is_collapsed()))
147+
expand_sidebar();
148+
}
149+
}
150+
}
151+
152+
add_sidebar_button();
153+
var sidebarbutton = $('#sidebarbutton');
154+
set_position_from_cookie();
155+
});

0 commit comments

Comments
 (0)