Skip to content

Commit

Permalink
fix: Only display verso or recto pages on the manuscript grid
Browse files Browse the repository at this point in the history
  • Loading branch information
hepplerj committed Aug 15, 2024
1 parent a7e6650 commit 849af86
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions templates/manuscript.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ <h1>The Manuscript.</h1>
{% with document=page_obj.0 %}
{% if document.attached_images.all %}
{% for image in document.attached_images.all %}
<a href="{% url 'manuscript_page' document.slug %}">
<img src="{{ image.thumbnail.url }}" class="h-auto w-full" alt="Cover page {{document.page_range}}"
loading="lazy" />
</a>
<p class="prose-figcaption font-sans">
{{ document.page_range }} ({{document.docside}})
</p>
{% if image.image_type == "recto" or image.image_type == "verso" %}
<a href="{% url 'manuscript_page' document.slug %}">
<img src="{{ image.thumbnail.url }}" class="h-auto w-full" alt="Cover page {{document.page_range}}"
loading="lazy" />
</a>
<p class="prose-figcaption font-sans">
{{ document.page_range }} ({{document.docside}})
</p>
{% endif %}
{% endfor %}
{% else %}
{# Handle case where no images are attached #}
Expand Down Expand Up @@ -150,4 +152,4 @@ <h1>The Manuscript.</h1>
</nav>
</div>
</div>
{% endblock content %}
{% endblock content %}

0 comments on commit 849af86

Please sign in to comment.