calibre-web/cps/templates/book_cover.html

12 lines
455 B
HTML

{% macro book_cover_image(book, title=None) -%}
{%- set book_title = book.title if book.title else book.name -%}
{%- set book_title = title if title else book_title -%}
{% set srcset = book|get_cover_srcset %}
<img
srcset="{{ srcset }}"
src="{{ url_for('web.get_cover', book_id=book.id, resolution=0, cache_bust=book|last_modified) }}"
title="{{ book_title }}"
alt="{{ book_title }}"
/>
{%- endmacro %}