diff options
-rw-r--r-- | blog/templates/blog/blog_index_page.html | 2 | ||||
-rw-r--r-- | blog/templates/blog/blog_tag_index_page.html | 45 | ||||
-rw-r--r-- | jthanio/templatetags/custom_tags.py | 0 |
3 files changed, 32 insertions, 15 deletions
diff --git a/blog/templates/blog/blog_index_page.html b/blog/templates/blog/blog_index_page.html index 194fa03..f36aa83 100644 --- a/blog/templates/blog/blog_index_page.html +++ b/blog/templates/blog/blog_index_page.html @@ -63,5 +63,5 @@ </div> - </div> +</div> {% endblock %}
\ No newline at end of file diff --git a/blog/templates/blog/blog_tag_index_page.html b/blog/templates/blog/blog_tag_index_page.html index b431272..4132420 100644 --- a/blog/templates/blog/blog_tag_index_page.html +++ b/blog/templates/blog/blog_tag_index_page.html @@ -2,22 +2,39 @@ {% load wagtailcore_tags %} {% block content %} +<div class="container"> - {% if request.GET.tag|length %} - <h4>Showing pages tagged "{{ request.GET.tag }}"</h4> - {% endif %} + <div class="row"> - {% for blogpage in blogpages %} - <p> - <strong><a href="{% pageurl blogpage %}">{{ blogpage.title }}</a></strong><br /> - <small>Revised: {{ blogpage.latest_revision_created_at }}</small><br /> - {% if blogpage.author %} - <p>By {{ blogpage.author.profile }}</p> - {% endif %} - </p> + <!-- Blog Entries Column --> + <div class="col-md-8"> - {% empty %} - No pages found with that tag. - {% endfor %} + {% if request.GET.tag|length %} + <h1 class="my-4">Showing pages tagged "{{ request.GET.tag }}"</h1> + {% endif %} + {% 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 %}" class="btn btn-primary">Read More</a> + </div> + <div class="card-footer text-muted"> + Posted on {{ post.date }} + </div> + </div> + {% endwith %} + {% endfor %} + </div> + <!-- Sidebar Widgets Column --> + <div class="col-md-4"> + {% include "search.html" %} + </div> + + </div> +</div> + {% endblock %}
\ No newline at end of file diff --git a/jthanio/templatetags/custom_tags.py b/jthanio/templatetags/custom_tags.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/jthanio/templatetags/custom_tags.py |