Skip to content

Commit bec19a0

Browse files
committed
Added the search results template to deis theme.
1 parent 65d8b99 commit bec19a0

2 files changed

Lines changed: 38 additions & 2 deletions

File tree

docs/theme/deis/searchbox.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{#
2-
basic/searchbox.html
3-
~~~~~~~~~~~~~~~~~~~~
2+
deis/searchbox.html
3+
~~~~~~~~~~~~~~~~~~~
44

55
Sphinx sidebar template: quick search box.
66

docs/theme/deis/searchresults.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{#
2+
deis/searchresults.html
3+
~~~~~~~~~~~~~~~~~~~~~~~
4+
5+
Template for the body of the search results page.
6+
7+
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
8+
:license: BSD, see LICENSE for details.
9+
#}
10+
<h1 id="search-documentation">{{ _('Search') }}</h1>
11+
<p>
12+
From here you can search these documents. Enter your search
13+
words into the box below and click "search".
14+
</p>
15+
<form action="" method="get">
16+
<input type="text" name="q" value="" />
17+
<input type="submit" value="{{ _('search') }}" />
18+
<span id="search-progress" style="padding-left: 10px"></span>
19+
</form>
20+
{%- if search_performed %}
21+
<h2>{{ _('Search Results') }}</h2>
22+
{%- if not search_results %}
23+
<p>{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}</p>
24+
{%- endif %}
25+
{%- endif %}
26+
<div id="search-results">
27+
{%- if search_results %}
28+
<ul class="search">
29+
{% for href, caption, context in search_results %}
30+
<li><a href="{{ docroot }}{{ href }}/?highlight={{ q }}">{{ caption }}</a>
31+
<div class="context">{{ context|e }}</div>
32+
</li>
33+
{% endfor %}
34+
</ul>
35+
{%- endif %}
36+
</div>

0 commit comments

Comments
 (0)