Skip to content

Commit 3ef4356

Browse files
committed
Make search form nice with bootstrap.
1 parent 5df2642 commit 3ef4356

File tree

1 file changed

+33
-17
lines changed

1 file changed

+33
-17
lines changed

docs/_templates/search.html

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,40 @@ <h1 id="search-documentation">{{ _('Search') }}</h1>
4040
</p>
4141
{% endblock %}
4242
{% block searchbox %}
43-
<form action="" method="get" id="search-form">
44-
<label for="q" class="visuallyhidden">Search string</label>
45-
<input type="text" name="q" id="q" aria-labelledby="search-documentation" value="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
46-
47-
<input type="submit" value="{{ _('search') }}" />
43+
<form
44+
action=""
45+
method="get"
46+
id="search-form"
47+
class="form-inline"
48+
>
49+
<div class="input-group mr-2 mb-1">
50+
<input
51+
type="text" name="q" id="q"
52+
class="form-control"
53+
placeholder="Search the docs…"
54+
aria-labelledby="search-documentation" value="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
55+
<label for="q" class="sr-only">Search string</label>
56+
<div class="input-group-append">
57+
<button type="submit" class="btn btn-primary">{{ _('search') }}</button>
58+
</div>
59+
</div>
60+
61+
<div class="form-group mb-1">
62+
<label for="doc_section" class="sr-only">Filter by section</label>
63+
<select name="doc_section" id="doc_section" class="custom-select" >
64+
<option value="all">All Documentation</option>
65+
{% for id, title in
66+
[
67+
["backend","Backend"],
68+
["classic-ui","Classic UI"],
69+
["volto","Frontend"],
70+
["contributing","Contributing"],
71+
] %}
72+
<option value="{{id}}">{{ title }}</option>
73+
{% endfor %}
74+
</select>
75+
</div>
4876

49-
<label for="doc_section" class="visuallyhidden">Filter by section</label>
50-
<select name="doc_section" id="doc_section">
51-
<option value="all">All Documentation</option>
52-
{% for id, title in
53-
[
54-
["backend","Backend"],
55-
["classic-ui","Classic UI"],
56-
["contributing","Contributing"],
57-
] %}
58-
<option value="{{id}}">{{ title }}</option>
59-
{% endfor %}
60-
</select>
6177
<span id="search-progress" style="padding-left: 10px"></span>
6278
</form>
6379
{% endblock %}

0 commit comments

Comments
 (0)