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 @@ <div class="cover"> <a href="{{ url_for('web.show_book', book_id=entry.id) }}"> <span class="img" title="{{entry.title}}"> - {{ image.book_cover(entry, title=author.name|safe) }} + {{ image.book_cover(entry, alt=author.name|safe) }} {% if entry.id in read_book_ids %}<span class="badge read glyphicon glyphicon-ok"></span>{% endif %} </span> </a> 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 %} <a href="{{ url_for('web.show_book', book_id=entry.id) }}" data-toggle="modal" data-target="#bookDetailsModal" data-remote="false"> <span class="img" title="{{entry.title}}"> - {{ image.book_cover(entry, alt=entry.title) }} + {{ image.book_cover(entry) }} {% if entry.id in read_book_ids %}<span class="badge read glyphicon glyphicon-ok"></span>{% endif %} </span> </a> 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 @@ <div class="cover"> <a href="{{url_for('web.books_list', data=data, sort_param='stored', book_id=entry[0].series[0].id )}}"> <span class="img" title="{{entry[0].series[0].name}}"> - {{ 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) }} <span class="badge">{{entry.count}}</span> </span> </a> 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 %} <img srcset="{{ srcset }}" src="{{ url_for('web.get_cover', book_id=book.id, resolution='og', c=book|last_modified) }}" - title="{{ image_title }}" alt="{{ 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 %} <img srcset="{{ srcset }}" src="{{ url_for('web.get_series_cover', series_id=series.id, resolution='og', c='day'|cache_timestamp) }}" - title="{{ title }}" alt="{{ 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 @@ <div class="cover"> <a href="{{ url_for('web.show_book', book_id=entry.id) }}" data-toggle="modal" data-target="#bookDetailsModal" data-remote="false"> <span class="img" title="{{ entry.title }}"> - {{ image.book_cover(entry, alt=entry.title) }} + {{ image.book_cover(entry) }} {% if entry.id in read_book_ids %}<span class="badge read glyphicon glyphicon-ok"></span>{% endif %} </span> </a> @@ -92,7 +92,7 @@ <div class="cover"> <a href="{{ url_for('web.show_book', book_id=entry.id) }}" data-toggle="modal" data-target="#bookDetailsModal" data-remote="false"> <span class="img" title="{{ entry.title }}"> - {{ image.book_cover(entry, alt=entry.title) }} + {{ image.book_cover(entry) }} {% if entry.id in read_book_ids %}<span class="badge read glyphicon glyphicon-ok"></span>{% endif %} </span> </a> 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 %} <a href="{{ url_for('web.show_book', book_id=entry.Books.id) }}" data-toggle="modal" data-target="#bookDetailsModal" data-remote="false"> <span class="img" title="{{entry.Books.title}}" > - {{ image.book_cover(entry.Books, alt=entry.Books.title) }} + {{ image.book_cover(entry.Books) }} {% if entry.Books.id in read_book_ids %}<span class="badge read glyphicon glyphicon-ok"></span>{% endif %} </span> </a> 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 @@ <div class="cover"> <a href="{{ url_for('web.show_book', book_id=entry.id) }}" data-toggle="modal" data-target="#bookDetailsModal" data-remote="false"> <span class="img" title="{{entry.title}}" > - {{ image.book_cover(entry, alt=entry.title) }} + {{ image.book_cover(entry) }} {% if entry.id in read_book_ids %}<span class="badge read glyphicon glyphicon-ok"></span>{% endif %} </span> </a>