Skip to content

Commit 962f4aa

Browse files
author
Jon Wayne Parrott
committed
Switch to pydoctheme
1 parent d45ecc6 commit 962f4aa

File tree

4 files changed

+226
-20
lines changed

4 files changed

+226
-20
lines changed

source/conf.py

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -122,25 +122,18 @@
122122
# The theme to use for HTML and HTML Help pages. See the documentation for
123123
# a list of builtin themes.
124124
#
125-
html_theme = 'alabaster'
125+
html_theme = 'pydoctheme'
126126

127127
# Theme options are theme-specific and customize the look and feel of a theme
128128
# further. For a list of options available for each theme, see the
129129
# documentation.
130-
#
131130
html_theme_options = {
132-
'description': None,
133-
'github_user': 'pypa',
134-
'github_repo': 'python-packaging-user-guide',
135-
'github_banner': True,
136-
'travis_button': False,
137-
'font_family': "'Roboto', Georgia, sans",
138-
'head_font_family': "'Roboto', Georgia, serif",
139-
'code_font_family': "'Roboto Mono', 'Consolas', monospace",
131+
'collapsiblesidebar': True,
132+
'externalrefs': True,
140133
}
141134

142135
# Add any paths that contain custom themes here, relative to this directory.
143-
# html_theme_path = []
136+
html_theme_path = ['themes']
144137

145138
# The name for this set of Sphinx documents.
146139
# "<project> v<release> documentation" by default.
@@ -187,13 +180,10 @@
187180
# Custom sidebar templates, maps document names to template names.
188181
#
189182

183+
# Custom sidebar templates, filenames relative to this file.
190184
html_sidebars = {
191-
'**': [
192-
'about.html',
193-
'navigation.html',
194-
'relations.html',
195-
'searchbox.html',
196-
]
185+
'**': ['localtoc.html', 'relations.html', 'searchbox.html'],
186+
'index': ['globaltoc.html', 'searchbox.html']
197187
}
198188

199189
# Additional templates that should be rendered to pages, maps page names to

source/index.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Packaging Authority <https://www.pypa.io>`_.
1111
This guide is maintained on `github
1212
<https://github.com/pypa/python-packaging-user-guide>`_.
1313

14+
.. _docs.python.org: http://docs.python.org
15+
1416
.. toctree::
1517
:maxdepth: 1
1618

@@ -23,6 +25,3 @@ This guide is maintained on `github
2325
glossary
2426
support
2527
contribute
26-
27-
28-
.. _docs.python.org: http://docs.python.org
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
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+
.inline-search {
26+
display: inline;
27+
}
28+
form.inline-search input {
29+
display: inline;
30+
}
31+
form.inline-search input[type="submit"] {
32+
width: 30px;
33+
}
34+
35+
div.sphinxsidebar {
36+
background-color: #eeeeee;
37+
border-radius: 5px;
38+
line-height: 130%;
39+
font-size: smaller;
40+
}
41+
42+
div.sphinxsidebar h3, div.sphinxsidebar h4 {
43+
margin-top: 1.5em;
44+
}
45+
46+
div.sphinxsidebarwrapper > h3:first-child {
47+
margin-top: 0.2em;
48+
}
49+
50+
div.sphinxsidebarwrapper > ul > li > ul > li {
51+
margin-bottom: 0.4em;
52+
}
53+
54+
div.sphinxsidebar a:hover {
55+
color: #0095C4;
56+
}
57+
58+
form.inline-search input,
59+
div.sphinxsidebar input {
60+
font-family: 'Lucida Grande',Arial,sans-serif;
61+
border: 1px solid #999999;
62+
font-size: smaller;
63+
border-radius: 3px;
64+
}
65+
66+
div.sphinxsidebar input[type=text] {
67+
max-width: 150px;
68+
}
69+
70+
div.body {
71+
padding: 0 0 0 1.2em;
72+
}
73+
74+
div.body p {
75+
line-height: 140%;
76+
}
77+
78+
div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 {
79+
margin: 0;
80+
border: 0;
81+
padding: 0.3em 0;
82+
}
83+
84+
div.body hr {
85+
border: 0;
86+
background-color: #ccc;
87+
height: 1px;
88+
}
89+
90+
div.body pre {
91+
border-radius: 3px;
92+
border: 1px solid #ac9;
93+
}
94+
95+
div.body div.admonition, div.body div.impl-detail {
96+
border-radius: 3px;
97+
}
98+
99+
div.body div.impl-detail > p {
100+
margin: 0;
101+
}
102+
103+
div.body div.seealso {
104+
border: 1px solid #dddd66;
105+
}
106+
107+
div.body a {
108+
color: #0072aa;
109+
}
110+
111+
div.body a:visited {
112+
color: #6363bb;
113+
}
114+
115+
div.body a:hover {
116+
color: #00B0E4;
117+
}
118+
119+
tt, code, pre {
120+
font-family: monospace, sans-serif;
121+
font-size: 96.5%;
122+
}
123+
124+
div.body tt, div.body code {
125+
border-radius: 3px;
126+
}
127+
128+
div.body tt.descname, div.body code.descname {
129+
font-size: 120%;
130+
}
131+
132+
div.body tt.xref, div.body a tt, div.body code.xref, div.body a code {
133+
font-weight: normal;
134+
}
135+
136+
.deprecated {
137+
border-radius: 3px;
138+
}
139+
140+
table.docutils {
141+
border: 1px solid #ddd;
142+
min-width: 20%;
143+
border-radius: 3px;
144+
margin-top: 10px;
145+
margin-bottom: 10px;
146+
}
147+
148+
table.docutils td, table.docutils th {
149+
border: 1px solid #ddd !important;
150+
border-radius: 3px;
151+
}
152+
153+
table p, table li {
154+
text-align: left !important;
155+
}
156+
157+
table.docutils th {
158+
background-color: #eee;
159+
padding: 0.3em 0.5em;
160+
}
161+
162+
table.docutils td {
163+
background-color: white;
164+
padding: 0.3em 0.5em;
165+
}
166+
167+
table.footnote, table.footnote td {
168+
border: 0 !important;
169+
}
170+
171+
div.footer {
172+
line-height: 150%;
173+
margin-top: -2em;
174+
text-align: right;
175+
width: auto;
176+
margin-right: 10px;
177+
}
178+
179+
div.footer a:hover {
180+
color: #0095C4;
181+
}
182+
183+
.refcount {
184+
color: #060;
185+
}
186+
187+
.stableabi {
188+
color: #229;
189+
}
190+
191+
.highlight {
192+
background: none !important;
193+
}
194+

source/themes/pydoctheme/theme.conf

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

0 commit comments

Comments
 (0)