moviewyrm/fedireads/templates/snippets/book_cover.html

12 lines
470 B
HTML
Raw Normal View History

2020-03-15 22:41:23 +00:00
{% if book.cover %}
<img class="book-cover {{ size }}" src="/images/{{ book.cover }}" alt="{% include 'snippets/cover_alt.html' with book=book %}">
2020-03-15 22:41:23 +00:00
{% else %}
<div class="no-cover book-cover {{ size }}">
<img class="book-cover {{ size }}" src="/static/images/no_cover.jpg" alt="{% include 'snippets/cover_alt.html' with book=book %}">
2020-03-15 22:41:23 +00:00
<div>
<p class="title">{{ book.title }}</p>
<p>{{ book.authors.first.name }}</p>
</div>
</div>
{% endif %}