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