Skip to content

Commit eb5e3cb

Browse files
committed
Fix search bar width and remove legacy fields
1 parent df6eb42 commit eb5e3cb

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

python_docs_theme/layout.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,8 @@ <h3>{{ _('Navigation') }}</h3>
4848
{%- if builder != "htmlhelp" %}
4949
<div class="inline-search" role="search">
5050
<form class="inline-search" action="{{ pathto('search') }}" method="get">
51-
<input placeholder="{{ _('Quick search') }}" aria-label="{{ _('Quick search') }}" type="text" name="q" />
51+
<input placeholder="{{ _('Quick search') }}" aria-label="{{ _('Quick search') }}" type="search" name="q" />
5252
<input type="submit" value="{{ _('Go') }}" />
53-
<input type="hidden" name="check_keywords" value="yes" />
54-
<input type="hidden" name="area" value="default" />
5553
</form>
5654
</div>
5755
{%- endif %}
@@ -109,9 +107,8 @@ <h3>{{ _('Navigation') }}</h3>
109107
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" class="search-icon">
110108
<path fill-rule="nonzero" fill="currentColor" d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 001.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 00-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 005.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>
111109
</svg>
112-
<input type="search" name="q" aria-label="{{ _('Quick search') }}"/>
110+
<input placeholder="{{ _('Quick search') }}" aria-label="{{ _('Quick search') }}" type="search" name="q" />
113111
<input type="submit" value="{{ _('Go') }}"/>
114-
{# TODO missing hidden inputs #}
115112
</form>
116113
{%- endif %}
117114
</span>

python_docs_theme/static/pydoctheme.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ dl > dt span ~ em {
357357
.nav-content .search input[type=search] {
358358
border: 0;
359359
padding-left: 24px;
360+
width: 100%;
360361
flex: 1;
361362
}
362363
.nav-content .search input[type=submit] {

0 commit comments

Comments
 (0)