Skip to content

Backport PR #10374 on branch v2.2.2-doc #10832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 39 additions & 3 deletions doc/_static/mpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,6 @@ div.sphinxsidebar {
text-align: left;
/* margin-left: -100%; */
}
div.sphinxsidebarwrapper {
padding-top: 28px
}

div.sphinxsidebar h4, div.sphinxsidebar h3 {
margin: 1em 0 0.5em 0;
Expand All @@ -245,6 +242,11 @@ div.sphinxsidebar h4, div.sphinxsidebar h3 {
background-color: #AFC1C4;
}

div.sphinxsidebar h3 a {
/* workaround for table of contents heading, which is a link */
color: white !important;
}

div.sphinxsidebar ul {
padding-left: 1.5em;
margin-top: 7px;
Expand All @@ -258,6 +260,36 @@ div.sphinxsidebar ul ul {
margin-left: 20px;
}

div.sphinxsidebar #searchbox input {
border: 1px solid #aaa;
padding: 0.25em;
box-sizing: border-box;
}

div.sphinxsidebar #searchbox form {
display: inline-block;
width: 100%
}

div.sphinxsidebar #searchbox input[type="text"] {
float: left;
width: 80%;
}

div.sphinxsidebar #searchbox input[type="submit"] {
float: left;
width: 20%;
border-left: none;
}

div.sphinxsidebar #searchbox input[type="submit"]:hover {
background: #ddd;
}

div.sphinxsidebar .searchformwrapper {
display: block;
}

p {
margin: 0.8em 0 0.8em 0;
}
Expand Down Expand Up @@ -813,6 +845,10 @@ figcaption {
}
}

#sidebar-donations {
margin-top: 28px;
}

.donate_button {
background:#11557C;
font-weight:normal;
Expand Down
2 changes: 1 addition & 1 deletion doc/_templates/donate_sidebar.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<div>
<div id="sidebar-donations">
<a href="https://www.flipcause.com/secure/cause_pdetails/MjI1OA==" target="_blank"> <div class="donate_button" >Support Matplotlib</div></a>
<a href="https://www.flipcause.com/secure/cause_pdetails/MTY3NTU=" target="_blank"> <div class="donate_button" >Support NumFOCUS</div></a>
</div>
7 changes: 7 additions & 0 deletions doc/_templates/pagesource.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{%- if show_source and has_source and sourcename %}
<div id="sidebar-pagesource" role="note" aria-label="source link"
style="margin-top: 1.5em; padding-top: 0.1em; border-top: 1px solid #86989b">
<a href="{{ pathto('_sources/' + sourcename, true)|e }}"
style="color: #c0c0c0" rel="nofollow">{{ _('Show Page Source') }}</a>
</div>
{%- endif %}
6 changes: 3 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ def _check_deps():

# Custom sidebar templates, maps page names to templates.
html_sidebars = {
'index': ['donate_sidebar.html', 'searchbox.html'],
'**': ['localtoc.html', 'relations.html',
'sourcelink.html', 'searchbox.html']
'index': ['searchbox.html', 'donate_sidebar.html'],
'**': ['searchbox.html', 'localtoc.html', 'relations.html',
'pagesource.html']
}

# If false, no module index is generated.
Expand Down