Improve image html layout and add url
This commit is contained in:
parent
81624086cd
commit
bc3713ef03
1 changed files with 4 additions and 1 deletions
|
@ -3,11 +3,14 @@
|
||||||
{{- '\n ' -}} <h2 class="content__inner_third_heading">{{ this.title }}</h2>
|
{{- '\n ' -}} <h2 class="content__inner_third_heading">{{ this.title }}</h2>
|
||||||
{%- if this.box_image is defined and this.box_image != '' -%}
|
{%- if this.box_image is defined and this.box_image != '' -%}
|
||||||
{%- set image = record.attachments.images.get(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 != "" -%}
|
{%- if this.image_alt is defined and this.image_alt != "" -%}
|
||||||
{{- ' ' -}}
|
{{- ' ' -}}
|
||||||
alt="{{ this.image_alt }}"
|
alt="{{ this.image_alt }}"
|
||||||
{%- endif -%}/>
|
{%- endif -%}/>
|
||||||
|
{{- '\n ' -}} </a>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- if this.box_content is defined and this.box_content != "" -%}
|
{%- if this.box_content is defined and this.box_content != "" -%}
|
||||||
{{- '\n ' -}}
|
{{- '\n ' -}}
|
||||||
|
|
Loading…
Reference in a new issue