2021-04-09 21:57:49 +00:00
|
|
|
{% spaceless %}
|
|
|
|
|
|
|
|
{% load i18n %}
|
|
|
|
|
2021-04-24 10:48:55 +00:00
|
|
|
<figure
|
|
|
|
class="
|
|
|
|
cover-container
|
2021-04-24 19:16:30 +00:00
|
|
|
{{ cover_class }}
|
2021-04-24 10:48:55 +00:00
|
|
|
|
|
|
|
{% if not book.cover %}
|
|
|
|
no-cover
|
|
|
|
{% endif %}
|
|
|
|
"
|
|
|
|
|
2021-04-24 19:16:30 +00:00
|
|
|
{% if book.alt_text %}
|
|
|
|
title="{{ book.alt_text }}"
|
|
|
|
{% endif %}
|
2021-04-24 10:48:55 +00:00
|
|
|
>
|
|
|
|
<img
|
|
|
|
class="book-cover"
|
|
|
|
|
|
|
|
{% if book.cover %}
|
|
|
|
src="{% if img_path is None %}/images/{% else %}{{ img_path }}{% endif %}{{ book.cover }}"
|
2021-04-09 21:57:49 +00:00
|
|
|
itemprop="thumbnailUrl"
|
2021-04-24 10:48:55 +00:00
|
|
|
|
|
|
|
{% if book.alt_text %}
|
|
|
|
alt="{{ book.alt_text }}"
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
src="/static/images/no_cover.jpg"
|
|
|
|
alt="{% trans "No cover" %}"
|
|
|
|
{% endif %}
|
|
|
|
>
|
|
|
|
|
|
|
|
{% if not book.cover and book.alt_text %}
|
|
|
|
<figcaption class="cover_caption">
|
|
|
|
<p>{{ book.alt_text }}</p>
|
|
|
|
</figcaption>
|
2021-04-09 21:57:49 +00:00
|
|
|
{% endif %}
|
2021-04-24 10:48:55 +00:00
|
|
|
</figure>
|
2021-04-09 21:57:49 +00:00
|
|
|
{% endspaceless %}
|