template updates

pull/72/head
msramalho 2023-01-17 17:01:25 +00:00
rodzic 47dc788143
commit f1bc83818d
2 zmienionych plików z 10 dodań i 3 usunięć

Wyświetl plik

@ -29,6 +29,7 @@
margin: auto;
border: 1px solid;
border-collapse: collapse;
vertical-align:top;
}
table.metadata td:first-child {
@ -120,6 +121,7 @@
<p></p>
<div>
<b class="collapsible" title="expand">{{ prop }}:</b>
<p></p>
<div class="collapsible-content">
{% for subprop in m.properties[prop] %}
{% if subprop | is_media %}
@ -139,7 +141,7 @@
</ul>
</td>
<td>
{{ macros.display_media(m) }}
{{ macros.display_media(m, true) }}
</td>
</tr>
{% endfor %}

Wyświetl plik

@ -1,4 +1,4 @@
{% macro display_media(m) -%}
{% macro display_media(m, links) -%}
{% for url in m.urls %}
{% if url | length == 0 %}
@ -22,7 +22,12 @@ No preview available for {{ m.key }}.
{% endif %}
{% else %}
{{ m.url | urlize }}
{% endif %}
{% endif %}
{% if links %}
<br>
<a href="{{ url }}">open</a> or
<a href="{{ url }}" download="">download</a>
{% endif %}
{% endfor %}
{%- endmacro -%}