Update book_cover.html

This commit is contained in:
Joachim 2021-08-03 18:03:34 +02:00
parent ce4553b367
commit 14bf7fca2e

View file

@ -18,129 +18,27 @@
{% if enable_thumbnail_generation %} {% if enable_thumbnail_generation %}
{% if size_mobile == 'xsmall' %} {% if size_mobile %}
<source <source
media="(max-width: 768px)" media="(max-width: 768px)"
type="image/webp" type="image/webp"
srcset="{% get_book_cover_thumbnail book=book size='xsmall' ext='webp' %}" srcset="{% get_book_cover_thumbnail book=book size=size_mobile ext='webp' %}"
/> />
<source <source
media="(max-width: 768px)" media="(max-width: 768px)"
type="image/jpg" type="image/jpg"
srcset="{% get_book_cover_thumbnail book=book size='xsmall' ext='jpg' %}" srcset="{% get_book_cover_thumbnail book=book size=size_mobile ext='jpg' %}"
/>
{% elif size_mobile == 'small' %}
<source
media="(max-width: 768px)"
type="image/webp"
srcset="{% get_book_cover_thumbnail book=book size='small' ext='webp' %}"
/>
<source
media="(max-width: 768px)"
type="image/jpg"
srcset="{% get_book_cover_thumbnail book=book size='small' ext='jpg' %}"
/>
{% elif size_mobile == 'medium' %}
<source
media="(max-width: 768px)"
type="image/webp"
srcset="{% get_book_cover_thumbnail book=book size='medium' ext='webp' %}"
/>
<source
media="(max-width: 768px)"
type="image/jpg"
srcset="{% get_book_cover_thumbnail book=book size='medium' ext='jpg' %}"
/>
{% elif size_mobile == 'large' %}
<source
media="(max-width: 768px)"
type="image/webp"
srcset="{% get_book_cover_thumbnail book=book size='large' ext='webp' %}"
/>
<source
media="(max-width: 768px)"
type="image/jpg"
srcset="{% get_book_cover_thumbnail book=book size='large' ext='jpg' %}"
/>
{% elif size_mobile == 'xlarge' %}
<source
media="(max-width: 768px)"
type="image/webp"
srcset="{% get_book_cover_thumbnail book=book size='xlarge' ext='webp' %}"
/>
<source
media="(max-width: 768px)"
type="image/jpg"
srcset="{% get_book_cover_thumbnail book=book size='xlarge' ext='jpg' %}"
/>
{% elif size_mobile == 'xxlarge' %}
<source
media="(max-width: 768px)"
type="image/webp"
srcset="{% get_book_cover_thumbnail book=book size='xxlarge' ext='webp' %}"
/>
<source
media="(max-width: 768px)"
type="image/jpg"
srcset="{% get_book_cover_thumbnail book=book size='xxlarge' ext='jpg' %}"
/> />
{% endif %} {% endif %}
{% if size == 'xsmall' %}
<source <source
type="image/webp" type="image/webp"
srcset="{% get_book_cover_thumbnail book=book size='xsmall' ext='webp' %}" srcset="{% get_book_cover_thumbnail book=book size=size ext='webp' %}"
/> />
<source <source
type="image/jpg" type="image/jpg"
srcset="{% get_book_cover_thumbnail book=book size='xsmall' ext='jpg' %}" srcset="{% get_book_cover_thumbnail book=book size=size ext='jpg' %}"
/> />
{% elif size == 'small' %}
<source
type="image/webp"
srcset="{% get_book_cover_thumbnail book=book size='small' ext='webp' %}"
/>
<source
type="image/jpg"
srcset="{% get_book_cover_thumbnail book=book size='small' ext='jpg' %}"
/>
{% elif size == 'medium' %}
<source
type="image/webp"
srcset="{% get_book_cover_thumbnail book=book size='medium' ext='webp' %}"
/>
<source
type="image/jpg"
srcset="{% get_book_cover_thumbnail book=book size='medium' ext='jpg' %}"
/>
{% elif size == 'large' %}
<source
type="image/webp"
srcset="{% get_book_cover_thumbnail book=book size='large' ext='webp' %}"
/>
<source
type="image/jpg"
srcset="{% get_book_cover_thumbnail book=book size='large' ext='jpg' %}"
/>
{% elif size == 'xlarge' %}
<source
type="image/webp"
srcset="{% get_book_cover_thumbnail book=book size='xlarge' ext='webp' %}"
/>
<source
type="image/jpg"
srcset="{% get_book_cover_thumbnail book=book size='xlarge' ext='jpg' %}"
/>
{% elif size == 'xxlarge' %}
<source
type="image/webp"
srcset="{% get_book_cover_thumbnail book=book size='xxlarge' ext='webp' %}"
/>
<source
type="image/jpg"
srcset="{% get_book_cover_thumbnail book=book size='xxlarge' ext='jpg' %}"
/>
{% endif %}
{% endif %} {% endif %}