replaywebpage

This commit is contained in:
msramalho
2023-01-22 00:48:09 +00:00
parent 746f6a333e
commit 092ffdb6d8
5 changed files with 36 additions and 26 deletions

View File

@@ -125,7 +125,7 @@
<div class="collapsible-content">
{% for subprop in m.properties[prop] %}
{% if subprop | is_media %}
{{ macros.display_media(subprop) }}
{{ macros.display_media(subprop, false, url) }}
{% else %}
{{ subprop }}
{% endif %}
@@ -141,7 +141,7 @@
</ul>
</td>
<td>
{{ macros.display_media(m, true) }}
{{ macros.display_media(m, true, url) }}
</td>
</tr>
{% endfor %}

View File

@@ -1,4 +1,4 @@
{% macro display_media(m, links) -%}
{% macro display_media(m, links, main_url) -%}
{% for url in m.urls %}
{% if url | length == 0 %}
@@ -17,6 +17,8 @@ No URL available for {{ m.key }}.
<source src="{{ url }}" type="{{ m.mimetype }}">
Your browser does not support the audio element.
</audio>
{% elif m.filename | get_extension == ".wacz" %}
<a href="https://replayweb.page/?source={{ url | quote }}#view=pages&url={{ main_url }}">replayweb</a>
{% else %}
No preview available for {{ m.key }}.
{% endif %}