Skip to content
Myr

search.html

This file

Path

docs/_templates/search.html

35 lines · 1.1 KiB · HTML

Last changed by

switched back to explicit set for assignments. {% foo = 42 %} becomes {% set foo = 42 %} and {% foo.something() }} becomes {{ void(foo.something() }} with this commit.Armin Ronacherbefore adoption0a2ac69

History of this file

Take it

The walk stopped after 200 commits: lines older than b217886 point at it.

added author information and fixed small off-by-one bugArmin Ronacherbefore adoptionb217886

line 1why, one step back
1{% extends "layout.html" %}

switched back to explicit set for assignments. {% foo = 42 %} becomes {% set foo = 42 %} and {% foo.something() }} becomes {{ void(foo.something() }} with this commit.Armin Ronacherbefore adoption0a2ac69

line 2why, one step back
2{% set title = 'Search' %}

added author information and fixed small off-by-one bugArmin Ronacherbefore adoptionb217886

lines 3–13why, one step back
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 search10 words into the box below and click "search". Note that the search11 function will automatically search for all of the words. Pages12 containing less words won't appear in the result list.13 </p>

some documentation updatesArmin Ronacherbefore adoptioned98cac

lines 14–17why, one step back
14 <form action="" method="get"><p>
15 <input type="text" name="q" value="">16 <input type="submit" value="search">17 </p></form>

added author information and fixed small off-by-one bugArmin Ronacherbefore adoptionb217886

lines 18–35why, one step back
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 %}