Merge pull request #1214 from dalf/update_template_image

Template images.html: always use JS to lazy load the full size images
This commit is contained in:
Alexandre Flament 2022-05-24 23:14:47 +02:00 committed by GitHub
commit d694b339c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -9,11 +9,7 @@
<a class="result-detail-previous" href="#">{{ icon('chevron-left') }}</a>{{- "" -}} <a class="result-detail-previous" href="#">{{ icon('chevron-left') }}</a>{{- "" -}}
<a class="result-detail-next" href="#">{{ icon('chevron-right') }}</a>{{- "" -}} <a class="result-detail-next" href="#">{{ icon('chevron-right') }}</a>{{- "" -}}
<a class="result-images-source" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} href="{{ result.img_src }}"> <a class="result-images-source" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} href="{{ result.img_src }}">
{%- if result.thumbnail_src -%} <img src="" data-src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}">{{- "" -}}
<img src="" data-src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}">
{%- else -%}
<img src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" loading="lazy" width="200" height="200">
{%- endif -%}
</a>{{- "" -}} </a>{{- "" -}}
<div class="result-images-labels">{{- "" -}} <div class="result-images-labels">{{- "" -}}
<h4>{{ result.title|striptags }}</h4>{{- "" -}} <h4>{{ result.title|striptags }}</h4>{{- "" -}}