From 7d294523a1207f74dc312a8774c2008998408378 Mon Sep 17 00:00:00 2001 From: Matthias Portzel Date: Tue, 14 Jun 2022 09:24:55 -1000 Subject: [PATCH] Add `spaceless` tag to remove whitespace from iterating thoughts * Also, removes line of dead code (get_season never existed) --- thoughts/templates/thoughts/index.html | 6 ++++-- thoughts/templates/thoughts/search/search.html | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/thoughts/templates/thoughts/index.html b/thoughts/templates/thoughts/index.html index 5eb2dcb..2d9997f 100644 --- a/thoughts/templates/thoughts/index.html +++ b/thoughts/templates/thoughts/index.html @@ -25,6 +25,7 @@ + {% spaceless %} {% for thought in thoughts %} {% if thought.uuid == highlighted %} @@ -36,6 +37,8 @@ {% endif %} {% endif %} {% endfor %} + {% endspaceless %} + {% endblock %} {% block main %} @@ -68,7 +71,7 @@ {% if thought.extended_text.strip %} {{ thought.extended_text|urlize }} {% endif %} - {% if file_type == "png" or file_type == "jpeg" %} + {% if file_type == "png" or file_type == "jpeg" or file_type == "jpg" %} {{ thought.media_alt }} {% elif file_type == "m4a" or file_type == "mp3" or file_type == "aac" %} @@ -103,7 +106,6 @@ {{ thought.posted|date:"M d, Y" }}, UTC{{ thought.get_offset_hours }} - {{ thought.get_season }} {% endtimezone %} diff --git a/thoughts/templates/thoughts/search/search.html b/thoughts/templates/thoughts/search/search.html index 2cbe5b1..165308a 100644 --- a/thoughts/templates/thoughts/search/search.html +++ b/thoughts/templates/thoughts/search/search.html @@ -34,7 +34,6 @@ {{ thought.object.posted|date:"M d, Y" }}, UTC{{ thought.object.get_offset_hours }} - {{ thought.object.get_season }} {% endtimezone %}