Make alt text a model property

This commit is contained in:
Mouse Reeve
2020-12-17 12:30:49 -08:00
parent 2799ed68e3
commit 39dc0501a5
6 changed files with 43 additions and 46 deletions

View File

@ -1,13 +1,13 @@
{% load bookwyrm_tags %}
<div class="cover-container is-{{ size }}">
{% if book.cover %}
<img class="book-cover" src="/images/{{ book.cover }}" alt="{% include 'snippets/cover_alt.html' with book=book %}">
<img class="book-cover" src="/images/{{ book.cover }}" alt="{{ book.alt_text }}">
{% else %}
<div class="no-cover book-cover">
<img class="book-cover" src="/static/images/no_cover.jpg" alt="No cover">
<div>
<p>{{ book.title }}</p>
<p>({{ book|edition_info }})</p>
<p>({{ book.edition_info }})</p>
</div>
</div>
{% endif %}

View File

@ -1,2 +0,0 @@
{% load bookwyrm_tags %}
'{{ book.title }}' Cover ({{ book|edition_info }})