diff options
author | Tyler Kennedy | 2022-12-08 12:59:36 -0500 |
---|---|---|
committer | GitHub | 2022-12-08 10:59:36 -0700 |
commit | 39bcd7ac0050b98ecf99eddb397fa895ee37b737 (patch) | |
tree | 9d16cf14c010e84a5d08f2da944c58ea059231c9 /templates | |
parent | a576c5b5ed716b8068c02914fd47f38473610590 (diff) | |
download | takahe-39bcd7ac0050b98ecf99eddb397fa895ee37b737.tar.gz takahe-39bcd7ac0050b98ecf99eddb397fa895ee37b737.tar.bz2 takahe-39bcd7ac0050b98ecf99eddb397fa895ee37b737.zip |
Move image attachments on posts into the content warning block. (#148)
Also adds alt text to image attachments.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/activities/_post.html | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/templates/activities/_post.html b/templates/activities/_post.html index 4e5cb7c..099a35f 100644 --- a/templates/activities/_post.html +++ b/templates/activities/_post.html @@ -70,6 +70,18 @@ <div class="content {% if post.summary %}hidden{% endif %}"> {{ post.safe_content_local }} + + {% if post.attachments.exists %} + <div class="attachments"> + {% for attachment in post.attachments.all %} + {% if attachment.is_image %} + <a href="{{ attachment.full_url }}" class="image"> + <img src="{{ attachment.thumbnail_url }}" title="{{ attachment.name }}" alt="{{ attachment.name }}" /> + </a> + {% endif %} + {% endfor %} + </div> + {% endif %} </div> {% if post.edited %} @@ -78,15 +90,5 @@ </div> {% endif %} - {% if post.attachments.exists %} - <div class="attachments"> - {% for attachment in post.attachments.all %} - {% if attachment.is_image %} - <a href="{{ attachment.full_url }}" class="image"><img src="{{ attachment.thumbnail_url }}" title="{{ attachment.name }}"></a> - {% endif %} - {% endfor %} - </div> - {% endif %} - <a class="whole-box" href="{{ post.urls.view }}" tabindex="-1"></a> </div> |