blob: eb34ec8398a1ac084924160c495c93ad8adbda2e (
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
40
41
|
{% extends "base.html" %}
{% load static wagtailcore_tags %}
{% block body_class %}template-searchresults{% endblock %}
{% block title %}Search{% endblock %}
{% block content %}
<div class="container">
<div class="row">
{# Blog Entries Column #}
<div class="col-md-8">
{% if search_results %}
<h1 class="my-4">Showing search results for "{{ search_query }}"</h1>
{% for result in search_results %}
{% with post=result.specific %}
{# Blog Post #}
<div class="card mb-4">
<div class="card-body">
<a href="{% pageurl post %}"><h2 class="card-title">{{ post.title }}</h2></a>
<p class="card-text">{{ post.intro }}</p>
</div>
<div class="card-footer text-muted">
Posted on {{ post.date }}
</div>
</div>
{% endwith %}
{% endfor %}
{% elif search_query %}
<h1 class="my-4">No results found</h1>
{% endif %}
{# end of results #}
<p><a href="{{ request.META.HTTP_REFERER }}">Return to previous page</a></p>
</div>
{# Sidebar Widgets Column #}
<div class="col-md-4">
{% include "search.html" %}
</div>
</div>
</div>
{% endblock %}
|