Extends cover alt with format and publication info

Works on #153
This commit is contained in:
Mouse Reeve 2020-05-03 14:27:42 -07:00
parent f9198d2d4c
commit aaa44d1db0
2 changed files with 3 additions and 2 deletions

View file

@ -1,8 +1,8 @@
{% if book.cover %}
<img class="book-cover {{ size }}" src="/images/{{ book.cover }}" alt="'{{ book.title }}' 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="'{{ book.title }}' Cover">
<img class="book-cover {{ size }}" src="/static/images/no_cover.jpg" alt="{% include 'snippets/cover_alt.html' with book=book %}">
<div>
<p class="title">{{ book.title }}</p>
<p>{{ book.authors.first.name }}</p>

View file

@ -0,0 +1 @@
'{{ 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 %})