1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-25 11:07:22 +00:00
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 %}