Skip to content

Commit 3953b9f

Browse files
committed
Updated Sphinx documentation templates
1 parent 671e0de commit 3953b9f

3 files changed

Lines changed: 63 additions & 5 deletions

File tree

docs/theme/deis/search.html

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{#
2+
basic/search.html
3+
~~~~~~~~~~~~~~~~~
4+
5+
Template for the search page.
6+
7+
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
8+
:license: BSD, see LICENSE for details.
9+
#}
10+
{%- extends "layout.html" %}
11+
{% set title = _('Search') %}
12+
{% set script_files = script_files + ['_static/searchtools.js'] %}
13+
{% block extrahead %}
14+
<script type="text/javascript">
15+
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
16+
</script>
17+
{# this is used when loading the search index using $.ajax fails,
18+
such as on Chrome for documents on localhost #}
19+
<script type="text/javascript" id="searchindexloader"></script>
20+
{{ super() }}
21+
{% endblock %}
22+
{% block body %}
23+
<h1 style="display:none;" id="search-documentation">{{ _('Search') }}</h1>
24+
<div id="fallback" class="admonition warning">
25+
<script type="text/javascript">$('#fallback').hide();</script>
26+
<p>
27+
{% trans %}Please activate JavaScript to enable the search
28+
functionality.{% endtrans %}
29+
</p>
30+
</div>
31+
<p style="display:none;">
32+
{% trans %}From here you can search these documents. Enter your search
33+
words into the box below and click "search". Note that the search
34+
function will automatically search for all of the words. Pages
35+
containing fewer words won't appear in the result list.{% endtrans %}
36+
</p>
37+
<form action="" method="get" style="display:none;">
38+
<input type="text" name="q" value="" />
39+
<input type="submit" value="{{ _('search') }}" />
40+
<span id="search-progress" style="padding-left: 10px"></span>
41+
</form>
42+
{% if search_performed %}
43+
<h1>{{ _('Search Results') }}</h1>
44+
{% if not search_results %}
45+
<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>
46+
{% endif %}
47+
{% endif %}
48+
<div id="search-results">
49+
{% if search_results %}
50+
<ul>
51+
{% for href, caption, context in search_results %}
52+
<li><a href="{{ pathto(item.href) }}">{{ caption }}</a>
53+
<div class="context">{{ context|e }}</div>
54+
</li>
55+
{% endfor %}
56+
</ul>
57+
{% endif %}
58+
</div>
59+
{% endblock %}

docs/theme/deis/searchbox.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
88
:license: BSD, see LICENSE for details.
99
#}
10-
{%- if pagename != "search" %}
10+
1111
<div id="searchbox" style="display: none">
1212
<!-- <h3>{{ _('Search') }}</h3> -->
1313
<form class="search" action="{{ pathto('search') }}" method="get">
@@ -21,4 +21,3 @@
2121
</p>
2222
</div>
2323
<script type="text/javascript">$('#searchbox').show(0);</script>
24-
{%- endif %}

docs/theme/deis/searchresults.html

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

55
Template for the body of the search results page.
66

@@ -18,7 +18,7 @@ <h1 id="search-documentation">{{ _('Search') }}</h1>
1818
<span id="search-progress" style="padding-left: 10px"></span>
1919
</form>
2020
{%- if search_performed %}
21-
<h2>{{ _('Search Results') }}</h2>
21+
<h1>{{ _('Search Results') }}</h1>
2222
{%- if not search_results %}
2323
<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>
2424
{%- endif %}

0 commit comments

Comments
 (0)