aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2023-02-16 13:08:17 +0000
committerLibravatar cel 🌸 <cel@blos.sm>2023-02-16 13:08:17 +0000
commit059cf500e7cd98de88c59d6824354a3d2d87fc89 (patch)
tree883cdf251236dca20a27215da8e064434b3ff022 /templates
parentb8bbceb00be3ba01cd14a111f4dfc407880f493e (diff)
downloadblossom-059cf500e7cd98de88c59d6824354a3d2d87fc89.tar.gz
blossom-059cf500e7cd98de88c59d6824354a3d2d87fc89.tar.bz2
blossom-059cf500e7cd98de88c59d6824354a3d2d87fc89.zip
add skweet image/video support
Diffstat (limited to 'templates')
-rw-r--r--templates/latestskweets.html.tera9
1 files changed, 7 insertions, 2 deletions
diff --git a/templates/latestskweets.html.tera b/templates/latestskweets.html.tera
index b2e8979..d698eea 100644
--- a/templates/latestskweets.html.tera
+++ b/templates/latestskweets.html.tera
@@ -5,12 +5,16 @@
<div class="skweet">
<img src="{{ skweet.account.avatar }}" class="profile">
<div class="skweet-content">
- <div class="skweet-info"><h4>{{ skweet.account.username }}</h4><a href="skweet.url"><h5>{{ skweet.created_at | date(format="%Y-%m-%d %H:%M") }}UTC</h5></a></div>
+ <div class="skweet-info"><h4>{{ skweet.account.username }}</h4><a href="{{ skweet.url }}" target="_blank" rel="noopener noreferrer"><h5>{{ skweet.created_at | date(format="%Y-%m-%d %H:%M") }}UTC</h5></a></div>
<div class="skweet-text">{{ skweet.content }}</div>
{% if skweet.media_attachments[0] %}
<div class="skweet-gallery">
{% for media_attachment in skweet.media_attachments %}
+ {% if media_attachment.type == "image" %}
<img src="{{ media_attachment.url }}">
+ {% elif media_attachment.type == "video" %}
+ <video controls src="{{ media_attachment.url }}"></video>
+ {% endif %}
{% endfor %}
</div>
{% endif %}
@@ -18,4 +22,5 @@
</div>
{% endif %}
{% endfor %}
-</div> \ No newline at end of file
+</div>
+