From: Radek Czajka <rczajka@rczajka.pl> Date: Mon, 2 May 2022 10:02:22 +0000 (+0200) Subject: Covers page fix. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/66d85e5195d8beec76505ce6f38f0f6f74101e53?ds=inline;hp=6e19546487a3c569260400b96628eea3684fe040 Covers page fix. --- diff --git a/src/cover/templates/cover/image_list.html b/src/cover/templates/cover/image_list.html index 2d5608c0..02a3268d 100644 --- a/src/cover/templates/cover/image_list.html +++ b/src/cover/templates/cover/image_list.html @@ -20,17 +20,18 @@ {% for image in object_list %} <div class="col-md-3"> <div class="card"> - <a href="{{ image.get_absolute_url }}"> + <a href="{{ image.get_absolute_url }}"> + {% if image.file %} <img style="height: 100px; width: auto;" class="card-img-top" src="{% thumbnail image.file "x100" as thumb %} {{ thumb.url }} {% empty %} {{ image.file.url }} {% endthumbnail %}" /> - <div class="card-body"> - - {{ image }} - </div> -</a> + {% endif %} + <div class="card-body"> + {{ image }} + </div> + </a> </div> </div> {% endfor %}