Skip to content

Commit

Permalink
Merge pull request #48 from chnm/fix/thumbnails
Browse files Browse the repository at this point in the history
Fixed for loop for displaying next page thumbnails
  • Loading branch information
hepplerj authored Aug 15, 2024
2 parents c1729ea + ed8ee0e commit 66b72a9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions templates/manuscript_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@
{% if next_page %}
<a href="{% url 'manuscript_page' next_page.slug %}">
{# skip the image_type "fornesics" #}
{% if image_type != "forensics" %}
{% for image in next_page.attached_images.all %}
{% for image in next_page.attached_images.all %}
{% if image.image_type != "forensics" %}
<img class="w-32 h-32 object-cover" src="{{ image.thumbnail.url }}" alt="Next Page" load="lazy">
{% endfor %}
<caption>Next Page &rarr;</caption>
{% endif %}
{% endif %}
{% endfor %}
<caption>Next Page &rarr;</caption>
</a>
{% endif %}

Expand Down Expand Up @@ -120,7 +120,7 @@ <h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-title">
<div class="mt-2">
<div class="mt-2 grid grid-cols-3 gap-4">
{% for forensic_image in forensic_images %}
<img @click="open = true" class="w-32 h-32 object-cover" src="{{ forensic_image.image.url }}" alt="Thumbnail for forensic image {{ current_page }}" class="thumbnail" loading="lazy">
<img @click="open = true" class="w-72 h-72 object-cover" src="{{ forensic_image.image.url }}" alt="Thumbnail for forensic image {{ current_page }}" class="thumbnail" loading="lazy">
{% endfor %}

<p><a class="underline hover:no-underline" href="">Read the full forensics report</a>.</p>
Expand Down

0 comments on commit 66b72a9

Please sign in to comment.