properly linkfy images

pull/225/head
Aevann 2024-03-06 00:10:22 +02:00
parent c686c99fad
commit dbbd6a9e12
2 changed files with 6 additions and 2 deletions

View File

@ -18,7 +18,9 @@
<td>
{% set url=item[0] %}
{% if url.endswith('.webp') %}
<img alt="{{url}}" src="{{url}}" loading="lazy" class="dm_img" data-nonce="{{g.nonce}}" data-onclick="expandImage()">
<a href="{{url}}">
<img alt="{{url}}" src="{{url}}" loading="lazy" class="dm_img" data-nonce="{{g.nonce}}" data-onclick="expandImage()">
</a>
{% elif url.endswith('.mp4') %}
<p class="resizable">
<video controls preload="none" src="{{url}}"></video>

View File

@ -3,6 +3,8 @@
{% block content %}
<h2 class="mt-4">{{title}}</h2>
{% for url in urls %}
<img class="mt-4 mr-3" style="max-width:80vw" src="{{url}}" loading="lazy" data-nonce="{{g.nonce}}" data-onclick="expandImage()">
<a href="{{url}}">
<img class="mt-4 mr-3" style="max-width:80vw" src="{{url}}" loading="lazy" data-nonce="{{g.nonce}}" data-onclick="expandImage()">
</a>
{% endfor %}
{% endblock %}