Improve image html layout and add url

This commit is contained in:
L3D 2021-10-04 21:21:57 +02:00
parent 81624086cd
commit bc3713ef03
Signed by: l3d
GPG key ID: CD08445BFF4313D1

View file

@ -3,11 +3,14 @@
{{- '\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 | imagessrcwebp }}" width="{{ image | url | imageswidthwebp }}" srcset="{{ image | url | imagessrcsetwebp }}"
{{- '\n ' -}} <a href="{{ this.box_url }}">
{{- '\n ' -}} <img class="content__inner_third_image content__half_box_image" src="{{ image | url | imagessrcwebp }}" width="{{ image | url | imageswidthwebp }}"
{{- '\n ' -}} srcset="{{ image | url | imagessrcsetwebp }}"
{%- if this.image_alt is defined and this.image_alt != "" -%}
{{- ' ' -}}
alt="{{ this.image_alt }}"
{%- endif -%}/>
{{- '\n ' -}} </a>
{%- endif -%}
{%- if this.box_content is defined and this.box_content != "" -%}
{{- '\n ' -}}