Add `spaceless` tag to remove whitespace from iterating thoughts

* Also, removes line of dead code (get_season never existed)
This commit is contained in:
Matthias Portzel 2022-06-14 09:24:55 -10:00
parent 30918a179f
commit 7d294523a1
2 changed files with 4 additions and 3 deletions

View File

@ -25,6 +25,7 @@
<meta content="Thoughts" property="og:title">
<meta content="Thoughts" name="twitter:title">
{% spaceless %}
{% for thought in thoughts %}
{% if thought.uuid == highlighted %}
<meta content="{{ thought.text }}" property="og:description">
@ -36,6 +37,8 @@
{% endif %}
{% endif %}
{% endfor %}
{% endspaceless %}
{% endblock %}
{% block main %}
@ -68,7 +71,7 @@
{% if thought.extended_text.strip %}
<span class="extended-text text">{{ thought.extended_text|urlize }}</span>
{% endif %}
{% if file_type == "png" or file_type == "jpeg" %}
{% if file_type == "png" or file_type == "jpeg" or file_type == "jpg" %}
<img src="{{ thought.media.url }}" class="extended-media" alt="{{ thought.media_alt }}">
{% elif file_type == "m4a" or file_type == "mp3" or file_type == "aac" %}
<audio controls src="{{ thought.media.url }}" class="extended-media"></audio>
@ -103,7 +106,6 @@
{{ thought.posted|date:"M d, Y" }},
UTC{{ thought.get_offset_hours }}
{{ thought.get_season }}
{% endtimezone %}
</span>
</div>

View File

@ -34,7 +34,6 @@
{{ thought.object.posted|date:"M d, Y" }},
UTC{{ thought.object.get_offset_hours }}
{{ thought.object.get_season }}
{% endtimezone %}
</span>
</div>