Use lazy loading on all thumbnails

This commit is contained in:
augustin64 2024-01-16 21:25:32 +01:00
parent bb59dfe992
commit fb13e396e5
6 changed files with 9 additions and 7 deletions

View File

@ -11,7 +11,7 @@
<div>
<a href="/partition/{{ partition['uuid'] }}">
<div class="partition" id="partition-{{ partition['uuid'] }}">
<img class="partition-thumbnail" src="/thumbnails/{{ partition['uuid'] }}.jpg">
<img class="partition-thumbnail" src="/thumbnails/{{ partition['uuid'] }}.jpg" loading="lazy">
<div class="partition-description">
<div class="partition-name">{{ partition["name"] }}</div>
<div class="partition-author">{{ partition["author"] }}</div>

View File

@ -78,7 +78,7 @@
<div>
<a href="/partition/{{ partition['uuid'] }}">
<div class="partition" id="partition-{{ partition['uuid'] }}">
<img class="partition-thumbnail" src="/thumbnails/{{ partition['uuid'] }}.jpg">
<img class="partition-thumbnail" src="/thumbnails/{{ partition['uuid'] }}.jpg" loading="lazy">
<div class="partition-description">
<div class="partition-name">{{ partition["name"] }}</div>
<div class="partition-author">{{ partition["author"] }}</div>

View File

@ -10,7 +10,7 @@
<div class="partition-container">
<a href="/partition/{{ partition['uuid'] }}">
<div class="partition" id="partition-{{ partition['uuid'] }}">
<img class="partition-thumbnail" src="/thumbnails/{{ partition['uuid'] }}.jpg">
<img class="partition-thumbnail" src="/thumbnails/{{ partition['uuid'] }}.jpg" loading="lazy">
<div class="partition-description">
<div class="partition-name">{{ partition["name"] }}</div>
<div class="partition-author">{{ partition["author"] }}</div>
@ -48,7 +48,7 @@
<div class="partition-container">
<a href="/partition/search/{{ partition['uuid'] }}">
<div class="partition" id="partition-{{ partition['uuid'] }}">
<img class="partition-thumbnail" src="/thumbnails/search/{{ partition['uuid'] }}.jpg">
<img class="partition-thumbnail" src="/thumbnails/search/{{ partition['uuid'] }}.jpg" loading="lazy">
<div class="partition-description">
<div class="partition-name">{{ partition["name"] }}</div>
</div>

View File

@ -1,6 +1,6 @@
<dialog id="share">
<center>
<img src="{{ share_qrlink }}" id="share-qrcode"><br/>
<img src="{{ share_qrlink }}" id="share-qrcode" loading="lazy"><br/>
<div id="share-url" onclick='navigator.clipboard.writeText("{{ share_link }}")'>
{{ share_link }}
</div>

View File

@ -50,7 +50,9 @@
</tr>
<tr>
<td>Fichier</td>
<td><a href="/partition/{{ partition.uuid }}"><img class="partition-thumbnail" src="/thumbnails/{{ partition.uuid }}.jpg"></a></td>
<td><a href="/partition/{{ partition.uuid }}">
<img class="partition-thumbnail" src="/thumbnails/{{ partition.uuid }}.jpg" loading="lazy">
</a></td>
</tr>
<tr>
<td>Titre</td>

View File

@ -12,7 +12,7 @@
<tr>
<td>Fichier</td>
<td><a href="/partition/{{ partition.uuid }}">
<img class="partition-thumbnail" src="/thumbnails/{{ partition.uuid }}.jpg">
<img class="partition-thumbnail" src="/thumbnails/{{ partition.uuid }}.jpg" loading="lazy">
</a></td>
</tr>
{% if partition.source != "unknown" and partition.source != "upload" %}