| 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 https://github.com/sphinx-doc/sphinx/blob/master/LICENSE for details. |
| 9 |
#} |
| 10 |
{%- extends "layout.html" %} |
| 11 |
{% set title = _('Search') %} |
| 12 |
{% set display_vcs_links = False %} |
| 13 |
{%- block scripts %} |
| 14 |
{{ super() }} |
| 15 |
<script src="{{ pathto('_static/searchtools.js', 1) }}"></script> |
| 16 |
<script src="{{ pathto('_static/language_data.js', 1) }}"></script> |
| 17 |
{%- endblock %} |
| 18 |
{% block footer %} |
| 19 |
<script> |
| 20 |
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); }); |
| 21 |
</script> |
| 22 |
{# this is used when loading the search index using $.ajax fails, |
| 23 |
such as on Chrome for documents on localhost #} |
| 24 |
<script id="searchindexloader"></script> |
| 25 |
{{ super() }} |
| 26 |
{% endblock %} |
| 27 |
{% block body %} |
| 28 |
<noscript> |
| 29 |
<div id="fallback" class="admonition warning"> |
| 30 |
<p class="last"> |
| 31 |
{% trans trimmed %}Please activate JavaScript to enable the search |
| 32 |
functionality.{% endtrans %} |
| 33 |
</p> |
| 34 |
</div> |
| 35 |
</noscript> |
| 36 |
|
| 37 |
{% if search_performed %} |
| 38 |
{# Translators: Search is a noun, not a verb #} |
| 39 |
<h2>{{ _('Search Results') }}</h2> |
| 40 |
{% if not search_results %} |
| 41 |
<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> |
| 42 |
{% endif %} |
| 43 |
{% endif %} |
| 44 |
<div id="search-results"> |
| 45 |
{% if search_results %} |
| 46 |
<ul> |
| 47 |
{% for href, caption, context in search_results %} |
| 48 |
<li> |
| 49 |
<a href="{{ pathto(item.href) }}">{{ caption }}</a> |
| 50 |
<p class="context">{{ context|e }}</p> |
| 51 |
</li> |
| 52 |
{% endfor %} |
| 53 |
</ul> |
| 54 |
{% endif %} |
| 55 |
</div> |
| 56 |
{% endblock %} |