summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan DeMasi <jonathan.demasi@colorado.edu>2020-03-04 21:32:41 -0700
committerJonathan DeMasi <jonathan.demasi@colorado.edu>2020-03-04 21:32:41 -0700
commit6a2022a18da024a41d6d583cec45b275b85a09c2 (patch)
tree89c490aaaf4bc914605088fe56492acfbc3f85c6
parent3066d9902231d532a8c17cfcd2eff3b0d6760794 (diff)
downloadjthanio-6a2022a18da024a41d6d583cec45b275b85a09c2.tar
jthanio-6a2022a18da024a41d6d583cec45b275b85a09c2.tar.gz
jthanio-6a2022a18da024a41d6d583cec45b275b85a09c2.tar.bz2
jthanio-6a2022a18da024a41d6d583cec45b275b85a09c2.tar.lz
jthanio-6a2022a18da024a41d6d583cec45b275b85a09c2.tar.xz
jthanio-6a2022a18da024a41d6d583cec45b275b85a09c2.tar.zst
jthanio-6a2022a18da024a41d6d583cec45b275b85a09c2.zip
formatting for tag listings
-rw-r--r--blog/templates/blog/blog_index_page.html2
-rw-r--r--blog/templates/blog/blog_tag_index_page.html45
-rw-r--r--jthanio/templatetags/custom_tags.py0
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