[SAVE] Zwischencommit

This commit is contained in:
TLRZ Seyfferth
2020-05-07 19:38:38 +02:00
parent 03ebd97cd0
commit bc3a113254
9 changed files with 96 additions and 55 deletions
@@ -7,12 +7,12 @@
{% for image in images %}
<a href="{{ image.url }}"
class="carousel-item">
{{ macros.variants(image) }}
{{ macros.variants(image.url, image.preview, image.alt, 200, 50 ) }}
</a>
{% endfor %}
</div>
{% else %}
{{ macros.variants(images.0, "materialboxed" ) }}
{{ macros.variants(images.0.url, images.0.preview, images.0.alt, 200, 50, "materialboxed" ) }}
{% endif %}
</div>
@@ -1,8 +1,12 @@
{% macro variants(image,class="") %}
<div data-href="{{image.url}}"
{% macro variants(fullImage,preview,alt="",height,width,class="") %}
{% set preview = preview!="" ? preview : fullImage %}
<div data-href="{{ fullImage }}"
class="progressive replace {{class}}">
<img src="{{ image.mypath }}/thumbs/{{ image.basename }}"
alt="{{ image.alt}}"
class="preview">
<img class="preview"
src="{{ preview }}"
alt="{{ alt}}"
height="{{ height }}"
width="{{ width }}">
</div>
{% endmacro %}