Skip to content

Commit 78b11f5

Browse files
committed
Update layout of sidebar in documentation
1 parent 8af1fac commit 78b11f5

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

doc/_static/mpl.css

+14-3
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,6 @@ div.sphinxsidebar {
232232
text-align: left;
233233
/* margin-left: -100%; */
234234
}
235-
div.sphinxsidebarwrapper {
236-
padding-top: 28px
237-
}
238235

239236
div.sphinxsidebar h4, div.sphinxsidebar h3 {
240237
margin: 1em 0 0.5em 0;
@@ -245,6 +242,11 @@ div.sphinxsidebar h4, div.sphinxsidebar h3 {
245242
background-color: #AFC1C4;
246243
}
247244

245+
div.sphinxsidebar h3 a {
246+
/* workaround for table of contents heading, which is a link */
247+
color: white !important;
248+
}
249+
248250
div.sphinxsidebar ul {
249251
padding-left: 1.5em;
250252
margin-top: 7px;
@@ -258,6 +260,11 @@ div.sphinxsidebar ul ul {
258260
margin-left: 20px;
259261
}
260262

263+
#searchbox input[type=text] {
264+
width: 100%;
265+
box-sizing: border-box;
266+
}
267+
261268
p {
262269
margin: 0.8em 0 0.8em 0;
263270
}
@@ -813,6 +820,10 @@ figcaption {
813820
}
814821
}
815822

823+
#sidebar-donations {
824+
margin-top: 28px;
825+
}
826+
816827
.donate_button {
817828
background:#11557C;
818829
font-weight:normal;

doc/_templates/donate_sidebar.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
<div>
2+
<div id="sidebar-donations">
33
<a href="https://www.flipcause.com/secure/cause_pdetails/MjI1OA==" target="_blank"> <div class="donate_button" >Support Matplotlib</div></a>
44
<a href="https://www.flipcause.com/secure/cause_pdetails/MTY3NTU=" target="_blank"> <div class="donate_button" >Support NumFOCUS</div></a>
55
</div>

doc/conf.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,8 @@ def _check_deps():
240240

241241
# Custom sidebar templates, maps page names to templates.
242242
html_sidebars = {
243-
'index': ['donate_sidebar.html', 'searchbox.html'],
244-
'**': ['localtoc.html', 'relations.html',
245-
'sourcelink.html', 'searchbox.html']
243+
'index': ['searchbox.html', 'donate_sidebar.html'],
244+
'**': ['searchbox.html', 'localtoc.html', 'relations.html']
246245
}
247246

248247
# If false, no module index is generated.

0 commit comments

Comments
 (0)