aboutsummaryrefslogtreecommitdiffstats
path: root/templates/wiki/search_results.html
blob: 9b9ad946bf10ae40d15f616d4b1133b9af975a27 (plain) (blame)
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
31
32
33
34
35
36
37
38
39
{% extends "wiki/base.html" %}
{% block title %}Wiki | Search Results{% endblock %}
{% block og_title %}Wiki | Search Results{% endblock %}
{% block og_description %}Search results{% endblock %}
{% block content %}
    <div class="uk-container uk-container-small">
        {% if not pages %}
            <h2 class="uk-title">
                Search
            </h2>
            <div class="uk-alert uk-alert-warning uk-text-center">
                <p>
                    Sorry, no results were found. Please check your query and try again.
                </p>
            </div>
        {% else %}
            <h2 class="uk-title">
                Search Results
            </h2>

            {% for page in pages %}
                <h4>
                    <a href="{{ url_for("wiki.page", page=page["slug"]) }}">{{ page.title }}</a>
                    (<span class="fira-code">{{ page.slug }}</span>)
                </h4>

                {% for snippet in page["matches"] %}
                    <div class="quote">
                        <i class="uk-icon far fa-ellipsis-h"></i>
                        <br />
                        {{ snippet | safe }}
                        <br />
                        <i class="uk-icon far fa-ellipsis-h"></i>
                    </div>
                {% endfor %}
            {% endfor %}
        {% endif %}
    </div>
{% endblock %}