Cleans up alt tag generation for covers
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
{% load fr_display %}
|
||||
{% if book.cover %}
|
||||
<img class="book-cover {{ size }}" src="/images/{{ book.cover }}" alt="{% include 'snippets/cover_alt.html' with book=book %}">
|
||||
{% 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 %}">
|
||||
<img class="book-cover {{ size }}" src="/static/images/no_cover.jpg" alt="No cover">
|
||||
<div>
|
||||
<p class="title">{{ book.title }}</p>
|
||||
<p>{{ book.authors.first.name }}</p>
|
||||
<p>({{ book|edition_info }})</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -1 +1,2 @@
|
||||
'{{ book.title }}' Cover ({% if book.physical_format %}{{ book.physical_format }}{% if book.published_date %}, {% endif %}{% endif %}{% if book.published_date %}{{ book.published_date.year }}{% endif %})
|
||||
{% load fr_display %}
|
||||
'{{ book.title }}' Cover ({{ book|edition_info }})
|
||||
|
Reference in New Issue
Block a user