summaryrefslogtreecommitdiff
path: root/blog/templates/blog/blog_tag_index_page.html
blob: 980c57d34d60434820ef42e4cfb664c176847693 (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
{% extends "base.html" %}
{% load wagtailcore_tags %}

{% block content %}
<div class="container">
    <div class="row">
      {# Blog Entries Column  #}
      <div class="col-md-8">
        {% if request.GET.tag|length %}
          <h1 class="my-4">Showing pages tagged "{{ request.GET.tag }}"</h1>

          {% for post in blogpages %}
            {% with post=post.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 %}
        {% else %}
          <h1 class="my-4">No pages with tag {{request.GET.tag }} available</h1>
        {% endif %}
        <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 %}