embedded new filters
This commit is contained in:
parent
4027d3c809
commit
032608dea9
3 changed files with 5 additions and 25 deletions
|
@ -28,4 +28,4 @@ url_prefix = /en/
|
|||
[packages]
|
||||
lektor-scss = 1.4.1
|
||||
lektor-image-resize = 0.6.1
|
||||
lektor-image-filter = 0.9
|
||||
lektor-image-filter = 1.1
|
||||
|
|
|
@ -3,31 +3,11 @@
|
|||
{{- '\n ' -}} <h2 class="content__inner_third_heading">{{ this.title }}</h2>
|
||||
{%- if this.box_image is defined and this.box_image != '' -%}
|
||||
{%- set image = record.attachments.images.get(this.box_image) -%}
|
||||
{{- '\n ' -}} <img class="content__inner_third_image content__half_box_image" src="{{ image|url }}"
|
||||
{{- '\n ' -}} width="{{ image.width / 2 | int }}"
|
||||
{{- '\n ' -}} <img class="content__inner_third_image content__half_box_image" src="{{ image | url | imagessrcwebp }}" width="{{ image | url | imageswidthwebp }}" srcset="{{ image | url | imagessrcsetwebp }}"
|
||||
{%- if this.image_alt is defined and this.image_alt != "" -%}
|
||||
{{- ' ' -}}
|
||||
alt="{{ this.image_alt }}"
|
||||
{%- endif -%}
|
||||
{{- ' ' -}}
|
||||
srcset="
|
||||
{%- set img_list = image.path.split('.') -%}
|
||||
{#
|
||||
{%- for option in ranger(int(bag('image-resize', 'option', 'range'))) -%}
|
||||
{%- for item in img_list -%}
|
||||
{%- if loop.index == loop.length -%}
|
||||
{{- '-' -}}
|
||||
{{- option -}}
|
||||
{{- '.webp -}}
|
||||
{%- elif loop.index == 1 -%}
|
||||
{{ item }}
|
||||
{%- else -%}
|
||||
.{{- item -}}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endfor -%}
|
||||
#}
|
||||
" /> <!-- YYY -->
|
||||
{%- endif -%}/>
|
||||
{%- endif -%}
|
||||
{%- if this.box_content is defined and this.box_content != "" -%}
|
||||
{{- '\n ' -}}
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
|
||||
ToDO: Nochmal nach Bildgrößen schauen, ggf. webp usw. mit einbeziehen...
|
||||
#}
|
||||
<img class="content__half_box_image" src="{{ image|url }}" width="{{ image.width / 2 }}"
|
||||
alt="{{ this.content_image_alt }}" srcset="{{ image.thumbnail(image.width / 2)|url }} 1x, {{ image|url }} 2x" />
|
||||
<img class="content__half_box_image" src="{{ image | url | imagessrcwebp }}" width="{{ image | url | imageswidthwebp }}"
|
||||
srcset="{{ image | url | imagessrcsetwebp }}" alt="{{ this.content_image_alt }}" />
|
||||
{%- if this.content_image_src is defined and this.content_image_alt != '' -%}
|
||||
{{- '\n ' -}} <p>{{ this.content_image_src }}</p>
|
||||
{%- endif -%}
|
||||
|
|
Loading…
Reference in a new issue