From aaa44d1db081904c432d87db34fd6feee7f8ff2b Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 3 May 2020 14:27:42 -0700 Subject: [PATCH] Extends cover alt with format and publication info Works on #153 --- fedireads/templates/snippets/book_cover.html | 4 ++-- fedireads/templates/snippets/cover_alt.html | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 fedireads/templates/snippets/cover_alt.html diff --git a/fedireads/templates/snippets/book_cover.html b/fedireads/templates/snippets/book_cover.html index 54b22357..3635532e 100644 --- a/fedireads/templates/snippets/book_cover.html +++ b/fedireads/templates/snippets/book_cover.html @@ -1,8 +1,8 @@ {% if book.cover %} -'{{ book.title }}' Cover +{% include 'snippets/cover_alt.html' with book=book %} {% else %}
- '{{ book.title }}' Cover + {% include 'snippets/cover_alt.html' with book=book %}

{{ book.title }}

{{ book.authors.first.name }}

diff --git a/fedireads/templates/snippets/cover_alt.html b/fedireads/templates/snippets/cover_alt.html new file mode 100644 index 00000000..055d6510 --- /dev/null +++ b/fedireads/templates/snippets/cover_alt.html @@ -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 %})