8000 Merge pull request #15882 from meeseeksmachine/auto-backport-of-pr-15… · matplotlib/matplotlib@a5fcddd · GitHub
[go: up one dir, main page]

Skip to content

Commit a5fcddd

Browse files
authored
Merge pull request #15882 from meeseeksmachine/auto-backport-of-pr-15859-on-v3.2.x
Backport PR #15859 on branch v3.2.x (Doc: Move search field into nav bar)
2 parents c845686 + e2b46b8 commit a5fcddd

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

doc/_static/mpl.css

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ div.viewcode-block:target {
11371137
border: 1px solid #11557C;
11381138
background: #eff9ff;
11391139
padding: 2px;
1140-
margin-top: 40px;
1140+
margin-top: 1em;
11411141
}
11421142

11431143
.sidebar-announcement p {
@@ -1162,11 +1162,21 @@ nav.main-nav{
11621162
margin: 8px 15px;
11631163
list-style-type: none;
11641164
}
1165-
1165+
11661166
nav.main-nav a{
11671167
color: white;
11681168
}
11691169

11701170
nav.main-nav a:hover{
11711171
text-decoration: underline;
1172-
}
1172+
}
1173+
1174+
nav.main-nav li.nav-right{
1175+
margin: 6px 15px 0 auto;
1176+
}
1177+
1178+
nav.main-nav input {
1179+
border: 0;
1180+
padding: 3px 6px;
1181+
width: 198px;
1182+
}

doc/_templates/layout.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
<li><a href="{{ pathto('gallery/index') }}">Examples</a></li>
5151
<li><a href="{{ pathto('tutorials/index') }}">Tutorials</a></li>
5252
<li><a href="{{ pathto('devel/index') }}">Contributing</a></li>
53+
<li class="nav-right">
54+
<form class="search" action="search.html" method="get">
55+
<input type="text" name="q" aria-labelledby="searchlabel" placeholder="Search"/>
56+
</form>
57+
</li>
5358
</ul>
5459
</nav>
5560
{%- endblock %}

doc/conf.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,8 @@ def _check_dependencies():
258258

259259
# Custom sidebar templates, maps page names to templates.
260260
html_sidebars = {
261-
'index': ['searchbox.html', 'sidebar_announcement.html',
262-
'donate_sidebar.html'],
263-
'**': ['searchbox.html', 'localtoc.html', 'relations.html',
264-
'pagesource.html']
261+
'index': ['sidebar_announcement.html', 'donate_sidebar.html'],
262+
'**': ['localtoc.html', 'relations.html', 'pagesource.html']
265263
}
266264

267265
# If false, no module index is generated.

0 commit comments

Comments
 (0)
0