{% macro display_media(m, links, main_url) -%} {% for url in m.urls %} {% if url | length == 0 %} No URL available for {{ m.key }}. {% elif 'http' in url %} {% if 'image' in m.mimetype %}
{% elif 'text' in m.mimetype %}
{{ m.key }}
.
{% endif %}
{% else %}
{{ m.url | urlize }}
{% endif %}
{% if links %}
open or
download or
{{ copy_urlize(url, "copy") }}