From 341632376768b10664b78f367c2d948861181e02 Mon Sep 17 00:00:00 2001 From: mmonkey Date: Wed, 26 Jan 2022 23:56:10 -0600 Subject: [PATCH] Removed title tags from cover images --- cps/templates/author.html | 2 +- cps/templates/discover.html | 2 +- cps/templates/grid.html | 2 +- cps/templates/image.html | 7 ++----- cps/templates/index.html | 4 ++-- cps/templates/search.html | 2 +- cps/templates/shelf.html | 2 +- 7 files changed, 9 insertions(+), 12 deletions(-) diff --git a/cps/templates/author.html b/cps/templates/author.html index 449efa53..9f124876 100644 --- a/cps/templates/author.html +++ b/cps/templates/author.html @@ -37,7 +37,7 @@
- {{ image.book_cover(entry, title=author.name|safe) }} + {{ image.book_cover(entry, alt=author.name|safe) }} {% if entry.id in read_book_ids %}{% endif %} diff --git a/cps/templates/discover.html b/cps/templates/discover.html index a39ba674..4842a7ea 100644 --- a/cps/templates/discover.html +++ b/cps/templates/discover.html @@ -10,7 +10,7 @@ {% if entry.has_cover is defined %} - {{ image.book_cover(entry, alt=entry.title) }} + {{ image.book_cover(entry) }} {% if entry.id in read_book_ids %}{% endif %} diff --git a/cps/templates/grid.html b/cps/templates/grid.html index 7d3add5e..638b7245 100644 --- a/cps/templates/grid.html +++ b/cps/templates/grid.html @@ -28,7 +28,7 @@
- {{ image.series(entry[0].series[0], title=entry[0].series[0].name|shortentitle) }} + {{ image.series(entry[0].series[0], alt=entry[0].series[0].name|shortentitle) }} {{entry.count}} diff --git a/cps/templates/image.html b/cps/templates/image.html index 728384a1..0bdba9a5 100644 --- a/cps/templates/image.html +++ b/cps/templates/image.html @@ -1,23 +1,20 @@ -{% macro book_cover(book, title=None, alt=None) -%} +{% macro book_cover(book, alt=None) -%} {%- set image_title = book.title if book.title else book.name -%} - {%- set image_title = title if title else image_title -%} {%- set image_alt = alt if alt else image_title -%} {% set srcset = book|get_cover_srcset %} {{ image_alt }} {%- endmacro %} -{% macro series(series, title=None, alt=None) -%} +{% macro series(series, alt=None) -%} {%- set image_alt = alt if alt else image_title -%} {% set srcset = series|get_series_srcset %} {{ book_title }} {%- endmacro %} diff --git a/cps/templates/index.html b/cps/templates/index.html index ef872ccc..ff7ff115 100644 --- a/cps/templates/index.html +++ b/cps/templates/index.html @@ -10,7 +10,7 @@
- {{ image.book_cover(entry, alt=entry.title) }} + {{ image.book_cover(entry) }} {% if entry.id in read_book_ids %}{% endif %} @@ -92,7 +92,7 @@
- {{ image.book_cover(entry, alt=entry.title) }} + {{ image.book_cover(entry) }} {% if entry.id in read_book_ids %}{% endif %} diff --git a/cps/templates/search.html b/cps/templates/search.html index 1bc741ca..12966348 100644 --- a/cps/templates/search.html +++ b/cps/templates/search.html @@ -46,7 +46,7 @@ {% if entry.Books.has_cover is defined %} - {{ image.book_cover(entry.Books, alt=entry.Books.title) }} + {{ image.book_cover(entry.Books) }} {% if entry.Books.id in read_book_ids %}{% endif %} diff --git a/cps/templates/shelf.html b/cps/templates/shelf.html index 13a119c0..693f6b4a 100644 --- a/cps/templates/shelf.html +++ b/cps/templates/shelf.html @@ -35,7 +35,7 @@