aboutsummaryrefslogtreecommitdiff
path: root/templates/search.twig
blob: be8ce54f0c378eeb50ac8b7830905bb8889435d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{% extends "skeleton.twig" %}
{% import "macros.twig" as macros %}

{% block body %}
    {% if error %}
        <div class="error">{{ error }}</div>
    {% else %}
        <ul class="search-result note-list">
        {% for result in results %}
            <li>
                <a href="{{ url("n/%s", result.note.id) }}">[e]</a>
                <div class="content">{{ result.renderHighlightedContent()|raw }}</div>
                <ul class="tags">
                    {% for tag in result.note.tags %}
                        <li class="tag">{{ macros.taglink(tag) }}</li>
                    {% endfor %}
                </ul>
            </li>
        {% endfor %}
        </ul>
    {% endif %}

{% endblock %}