mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 00:26:33 +00:00
Update book_cover.html
This commit is contained in:
parent
ce4553b367
commit
14bf7fca2e
1 changed files with 11 additions and 113 deletions
|
@ -18,129 +18,27 @@
|
|||
|
||||
{% if enable_thumbnail_generation %}
|
||||
|
||||
{% if size_mobile == 'xsmall' %}
|
||||
{% if size_mobile %}
|
||||
<source
|
||||
media="(max-width: 768px)"
|
||||
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
|
||||
media="(max-width: 768px)"
|
||||
type="image/jpg"
|
||||
srcset="{% get_book_cover_thumbnail book=book size='xsmall' 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' %}"
|
||||
srcset="{% get_book_cover_thumbnail book=book size=size_mobile ext='jpg' %}"
|
||||
/>
|
||||
{% endif %}
|
||||
|
||||
{% if size == 'xsmall' %}
|
||||
<source
|
||||
type="image/webp"
|
||||
srcset="{% get_book_cover_thumbnail book=book size='xsmall' ext='webp' %}"
|
||||
/>
|
||||
<source
|
||||
type="image/jpg"
|
||||
srcset="{% get_book_cover_thumbnail book=book size='xsmall' 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 %}
|
||||
<source
|
||||
type="image/webp"
|
||||
srcset="{% get_book_cover_thumbnail book=book size=size ext='webp' %}"
|
||||
/>
|
||||
<source
|
||||
type="image/jpg"
|
||||
srcset="{% get_book_cover_thumbnail book=book size=size ext='jpg' %}"
|
||||
/>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Reference in a new issue