Skip to content

Commit 71c8ca7

Browse files
committed
Improve sidebar layout
1 parent 2180d9e commit 71c8ca7

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{#
2+
basic/searchbox.html with heading removed.
3+
#}
4+
{%- if pagename != "search" and builder != "singlehtml" %}
5+
<div id="searchbox" style="display: none" role="search">
6+
<div class="searchformwrapper">
7+
<form class="search" action="{{ pathto('search') }}" method="get">
8+
<input type="text" name="q" aria-labelledby="searchlabel"
9+
placeholder="Search"/>
10+
<input type="submit" value="{{ _('Go') }}" />
11+
</form>
12+
</div>
13+
</div>
14+
<script type="text/javascript">$('#searchbox').show(0);</script>
15+
{%- endif %}

doc/en/_themes/flask/static/flasky.css_t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ div.sphinxsidebar h3,
106106
div.sphinxsidebar h4 {
107107
font-family: {{ header_font }};
108108
color: #444;
109-
font-size: 24px;
109+
font-size: 21px;
110110
font-weight: normal;
111-
margin: 0 0 5px 0;
111+
margin: 16px 0 0 0;
112112
padding: 0;
113113
}
114114

115115
div.sphinxsidebar h4 {
116-
font-size: 20px;
116+
font-size: 18px;
117117
}
118118

119119
div.sphinxsidebar h3 a {

doc/en/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,18 +167,18 @@
167167

168168
html_sidebars = {
169169
"index": [
170+
"slim_searchbox.html",
170171
"sidebarintro.html",
171172
"globaltoc.html",
172173
"links.html",
173174
"sourcelink.html",
174-
"searchbox.html",
175175
],
176176
"**": [
177+
"slim_searchbox.html",
177178
"globaltoc.html",
178179
"relations.html",
179180
"links.html",
180181
"sourcelink.html",
181-
"searchbox.html",
182182
],
183183
}
184184

0 commit comments

Comments
 (0)