summaryrefslogtreecommitdiff
path: root/templates/search.html
blob: e6bfe07de1fd8dbf74c79c966964c40149d19ab1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<html>
    <head>
        <title>{{ objects.__len__() + skip}} matches</title>
    </head>
    <body>
        {% if objects.__len__() == 0 %}
            No Matches
        {% else %}
            {% for obj in objects %}
                <hr />
                <h2> {{ obj['title'] }} </h2>
                <pre> {{ obj['path'] }} </pre>
                {% autoescape false %}
                    <div>{{ obj['excerpt'] }}</div>
                {% endautoescape %}
                <hr />
            {% endfor %}
        {% endif %}

        <div>
            {% if skip > 0 %}
                <a href="{{ url_for("do_search", term=term, skip=skip-5) }}">Previous 5</a>
            {% else %}
                Previous 5
            {% endif %}
             - 
            <a href="{{ url_for("do_search", term=term, skip=skip+5) }}">Next 5</a>
        </div>
    </body>
</html>