Show placeholder if there is no preview image (#842)

* Show placeholder if there is no preview image

* add test
This commit is contained in:
Sascha Ißbrücker
2024-09-20 08:56:17 +02:00
committed by GitHub
parent b4108c9a56
commit afa57aa10b
4 changed files with 34 additions and 7 deletions

View File

@@ -142,8 +142,14 @@
{% endif %}
</div>
</div>
{% if bookmark_list.show_preview_images and bookmark_item.preview_image_file %}
<img class="preview-image" src="{% static bookmark_item.preview_image_file %}" loading="lazy"/>
{% if bookmark_list.show_preview_images %}
{% if bookmark_item.preview_image_file %}
<img class="preview-image" src="{% static bookmark_item.preview_image_file %}" loading="lazy"/>
{% else %}
<div class="preview-image placeholder">
<div class="img"/>
</div>
{% endif %}
{% endif %}
</li>
{% endfor %}