summaryrefslogtreecommitdiff
path: root/blog/templates/blog/blog_tag_index_page.html
blob: fda427be52bc2c0507fc75687c4bf767af287669 (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
42
43
{% 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">
                  <h2 class="card-title">{{ post.title }}</h2>
                  <p class="card-text">{{ post.intro }}</p>
                  <a href="{% pageurl post %}">Read Post</a>
                </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 %}