Fix zoom in bibliography images (#3057)
Fixes #2668 Signed-off-by: George Araújo <george.gcac@gmail.com>
This commit is contained in:
parent
74beacb274
commit
d53297f256
@ -14,20 +14,22 @@
|
|||||||
https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images for info on defining 'sizes' for responsive images
|
https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images for info on defining 'sizes' for responsive images
|
||||||
-->
|
-->
|
||||||
{% if site.imagemagick.enabled %}
|
{% if site.imagemagick.enabled %}
|
||||||
<source
|
{% unless include.avoid_scaling %}
|
||||||
class="responsive-img-srcset"
|
<source
|
||||||
{% if ext == 'gif' or ext == 'jpeg' or ext == 'jpg' or ext == 'png' or ext == 'tiff' %}
|
class="responsive-img-srcset"
|
||||||
srcset="{% for i in site.imagemagick.widths %}{{ img_path | relative_url }}-{{ i }}.webp {{ i }}w,{% endfor %}"
|
{% if ext == 'gif' or ext == 'jpeg' or ext == 'jpg' or ext == 'png' or ext == 'tiff' %}
|
||||||
type="image/webp"
|
srcset="{% for i in site.imagemagick.widths %}{{ img_path | relative_url }}-{{ i }}.webp {{ i }}w,{% endfor %}"
|
||||||
{% else %}
|
type="image/webp"
|
||||||
srcset="{{ include.path | relative_url }}"
|
{% else %}
|
||||||
{% endif %}
|
srcset="{{ include.path | relative_url }}"
|
||||||
{% if include.sizes %}
|
{% endif %}
|
||||||
sizes="{{ include.sizes }}"
|
{% if include.sizes %}
|
||||||
{% else %}
|
sizes="{{ include.sizes }}"
|
||||||
sizes="95vw"
|
{% else %}
|
||||||
{% endif %}
|
sizes="95vw"
|
||||||
>
|
{% endif %}
|
||||||
|
>
|
||||||
|
{% endunless %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<img
|
<img
|
||||||
src="{% if include.url %}{{ include.url }}{% elsif include.cache_bust %}{{ include.path | relative_url | bust_file_cache }}{% else %}{{ include.path | relative_url }}{% endif %}"
|
src="{% if include.url %}{{ include.url }}{% elsif include.cache_bust %}{{ include.path | relative_url | bust_file_cache }}{% else %}{{ include.path | relative_url }}{% endif %}"
|
||||||
|
|||||||
@ -37,6 +37,7 @@
|
|||||||
sizes = "200px"
|
sizes = "200px"
|
||||||
class="preview z-depth-1 rounded"
|
class="preview z-depth-1 rounded"
|
||||||
zoomable=true
|
zoomable=true
|
||||||
|
avoid_scaling=true
|
||||||
alt=entry.preview
|
alt=entry.preview
|
||||||
%}
|
%}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user