2022-01-27 05:56:10 +00:00
|
|
|
{% macro book_cover(book, alt=None) -%}
|
2021-09-25 08:04:38 +00:00
|
|
|
{%- set image_title = book.title if book.title else book.name -%}
|
|
|
|
{%- 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) }}"
|
|
|
|
alt="{{ image_alt }}"
|
|
|
|
/>
|
|
|
|
{%- endmacro %}
|
|
|
|
|
2022-01-27 05:56:10 +00:00
|
|
|
{% macro series(series, alt=None) -%}
|
2021-09-25 08:04:38 +00:00
|
|
|
{%- set image_alt = alt if alt else image_title -%}
|
|
|
|
{% set srcset = series|get_series_srcset %}
|
|
|
|
<img
|
|
|
|
srcset="{{ srcset }}"
|
2021-09-29 08:01:28 +00:00
|
|
|
src="{{ url_for('web.get_series_cover', series_id=series.id, resolution='og', c='day'|cache_timestamp) }}"
|
2024-08-18 14:27:02 +00:00
|
|
|
alt="{{ title }}"
|
2021-09-25 08:04:38 +00:00
|
|
|
/>
|
|
|
|
{%- endmacro %}
|