{% comment %} Media attachments for one post. Images open in the lightbox (see base.html); playable video/GIF/audio renders inline; anything we only have a thumbnail for (X video, Bluesky's HLS video) links out to the post. hx-boost is off so external media links aren't intercepted as page loads. {% endcomment %}
{% for item in post.media %} {% if item.kind == "image" and item.url %} {{ item.alt_text }} {% elif item.kind == "gif" and item.url %} {% elif item.kind == "video" and item.url %} {% elif item.kind == "audio" and item.url %} {% elif item.preview_url %} {{ item.alt_text }} {% if item.kind == "video" or item.kind == "gif" %}{% endif %} {% elif item.url %} 📎 {{ item.alt_text|default:"Attachment" }} ↗ {% endif %} {% endfor %}