Skip to content

Commit

Permalink
Don't generate an empty page preview image for EEBO page results
Browse files Browse the repository at this point in the history
  • Loading branch information
rlskoeser committed Oct 30, 2024
1 parent 62fae7c commit cc6a2d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ppa/archive/templates/archive/snippets/page_preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
{% gale_page_url source_url page.order as page_link %}
{# currently no other sources with page level content, so no other case needed #}
{% endif %}
{% if source == 'HathiTrust' or source == 'Gale' %} {# we currently only support page images for these two #}
<div class="preview">
<a href="{{ page_link }}"
target="_blank" rel="noopener noreferrer">
Expand All @@ -39,9 +40,11 @@
<img src="{{ 1x_img }}" srcset="{{ 1x_img}}, {{ 2x_img }} 2x"
alt="page {{ page.label }}"/>
{% endwith %}
{% else %}
{% endif %}
</a>
</div>
{% endif %}
{% if page.title %}<a>p. {{ page.title }}</a>{% endif %}
<div class="snippets">
<p class="page-number">
Expand Down

0 comments on commit cc6a2d0

Please sign in to comment.