aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2023-06-20 23:04:56 +0100
committerLibravatar cel 🌸 <cel@blos.sm>2023-06-20 23:04:56 +0100
commitc24e154bb2b2299c68abbff8356e58008c875dbe (patch)
tree90c818a8e008898bbe8a2c988dc82ae731e220a9 /templates
parent2059f378f33d19d7ded5a91947c1d4289f7b3be3 (diff)
downloadblossom-c24e154bb2b2299c68abbff8356e58008c875dbe.tar.gz
blossom-c24e154bb2b2299c68abbff8356e58008c875dbe.tar.bz2
blossom-c24e154bb2b2299c68abbff8356e58008c875dbe.zip
improve skweet widget, namely time formatting
Diffstat (limited to '')
-rw-r--r--templates/base.html.tera2
-rw-r--r--templates/latestskweets.html.tera28
2 files changed, 24 insertions, 6 deletions
diff --git a/templates/base.html.tera b/templates/base.html.tera
index b48109c..081e0a1 100644
--- a/templates/base.html.tera
+++ b/templates/base.html.tera
@@ -40,7 +40,7 @@
<li><a class="{% block nav_girlblog %}{% endblock %}" style="font-family: Sligoil" href="/blog">girlblog</a></li>
<li><a class="{% block nav_projects %}{% endblock %}" style="font-family: 'DeGerm LoCase';" href="/projects">projetos</a></li>
<li><a class="{% block nav_sound %}{% endblock %}" style="font-family: 'kirieji'" href="/sound">音</a></li>
- <li><a class="{% block nav_listens %}{% endblock %}" style="font-family: 'Almendra Display'" href="https://listenbrainz.org/celblossom">écoute</a></li>
+ <li><a class="{% block nav_listens %}{% endblock %}" style="font-family: 'Almendra Display'; font-weight: 900;" href="https://listenbrainz.org/celblossom">écoute</a></li>
<li><a href="https://bimbo.video/a/cel" style="font-family: 'Mon Hugo In'">video</a></li>
<li><a href="https://weirdstar.stream" style="font-family: id_kana018" >🔴ライブ</a></li>
<li><a class="{% block nav_pix %}{% endblock %}" style="font-family: Minecraftia" href="/pix">pix</a></li>
diff --git a/templates/latestskweets.html.tera b/templates/latestskweets.html.tera
index d698eea..84798de 100644
--- a/templates/latestskweets.html.tera
+++ b/templates/latestskweets.html.tera
@@ -3,21 +3,39 @@
{% for skweet in skweets %}
{% if not skweet.reblog %}
<div class="skweet">
- <img src="{{ skweet.account.avatar }}" class="profile">
+ <img src="{{ skweet.avatar }}" class="profile">
<div class="skweet-content">
- <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-info"><h4>{{ skweet.username }}</h4><a href="{{ skweet.url }}" target="_blank" rel="noopener noreferrer"><h5>{{ skweet.time_since }} ago</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" %}
+ <a href="{{ media_attachment.url }}"><img src="{{ media_attachment.url }}"></a>
+ {% elif media_attachment.type == "video" %}
+ <video controls src="{{ media_attachment.url }}"></video>
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ </div>
+ </div>
+ {% elif skweet.reblog %}
+ <div class="boosted-skweet">
+ <h4>boosted:</h4>
+ <div class="skweet">
+ <img src="{{ skweet.avatar }}" class="profile">
+ <div class="skweet-content">
+ <div class="skweet-info"><h4>{{ skweet.username }}</h4><a href="{{ skweet.url }}" target="_blank" rel="noopener noreferrer"><h5>{{ skweet.time_since }} ago</h5></a></div>
+ <div class="skweet-text">{{ skweet.content }}</div>
+ {% if skweet.media_attachments[0] %}
{% for media_attachment in skweet.media_attachments %}
{% if media_attachment.type == "image" %}
- <img src="{{ media_attachment.url }}">
+ <a href="{{ media_attachment.url }}"><img src="{{ media_attachment.url }}"></a>
{% elif media_attachment.type == "video" %}
<video controls src="{{ media_attachment.url }}"></video>
{% endif %}
{% endfor %}
+ {% endif %}
</div>
- {% endif %}
</div>
</div>
{% endif %}