0c942b70fcc63c58622f9a4d6e976ad7f9b545fb
[jinja2.git] / docs / _templates / search.html
1 {% extends "layout.html" %}
2 {% set title = 'Search' %}
3 {% block extrahead %}
4     <script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>
5 {% endblock %}
6 {% block body %}
7   <h1 id="search-documentation">Search</h1>
8   <p>
9     From here you can search these documents. Enter your search
10     words into the box below and click "search". Note that the search
11     function will automatically search for all of the words. Pages
12     containing less words won't appear in the result list.
13   </p>
14   <form action="" method="get"><p>
15     <input type="text" name="q" value="">
16     <input type="submit" value="search">
17   </p></form>
18   {% if search_performed %}
19     <h2>Search Results</h2>
20     {% if not search_results %}
21       <p>Your search did not match any results.</p>
22     {% endif %}
23   {% endif %}
24   <div id="search-results">
25   {% if search_results %}
26     <ul>
27     {% for href, caption, context in search_results %}
28       <li><a href="{{ pathto(item.href) }}">{{ caption }}</a>
29         <div class="context">{{ context|e }}</div>
30       </li>
31     {% endfor %}
32     </ul>
33   {% endif %}
34   </div>
35 {% endblock %}