image with text link
parent
e526b3e49e
commit
92374c0a1e
|
@ -24,6 +24,24 @@
|
|||
endif
|
||||
-%}
|
||||
|
||||
{% liquid
|
||||
assign button_link = ""
|
||||
|
||||
for block in section.blocks
|
||||
case block.type
|
||||
when 'button'
|
||||
if block.settings.button_link != blank
|
||||
assign button_link = block.settings.button_link
|
||||
endif
|
||||
endcase
|
||||
endfor
|
||||
%}
|
||||
|
||||
<script>
|
||||
console.log("here2", {{ button_link }})
|
||||
</script>
|
||||
|
||||
|
||||
<div class="section-{{ section.id }}-padding gradient color-{{ section.settings.section_color_scheme }}">
|
||||
<div class="page-width">
|
||||
<div class="image-with-text image-with-text--{{ section.settings.content_layout }} isolate{% if settings.text_boxes_border_thickness > 0 and settings.text_boxes_border_opacity > 0 and settings.media_border_thickness > 0 and settings.media_border_opacity > 0 %} collapse-borders{% endif %}{% unless section.settings.color_scheme == section.settings.section_color_scheme and settings.media_border_thickness > 0 and settings.text_boxes_shadow_opacity == 0 and settings.text_boxes_border_thickness == 0 or settings.text_boxes_border_opacity == 0 %} collapse-corners{% endunless %}{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}">
|
||||
|
@ -107,6 +125,91 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{% comment %}
|
||||
<div class="section-{{ section.id }}-padding gradient color-{{ section.settings.section_color_scheme }}">
|
||||
<div class="page-width">
|
||||
<div class="image-with-text image-with-text--{{ section.settings.content_layout }} isolate{% if settings.text_boxes_border_thickness > 0 and settings.text_boxes_border_opacity > 0 and settings.media_border_thickness > 0 and settings.media_border_opacity > 0 %} collapse-borders{% endif %}{% unless section.settings.color_scheme == section.settings.section_color_scheme and settings.media_border_thickness > 0 and settings.text_boxes_shadow_opacity == 0 and settings.text_boxes_border_thickness == 0 or settings.text_boxes_border_opacity == 0 %} collapse-corners{% endunless %}{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}">
|
||||
<div class="image-with-text__grid grid grid--gapless grid--1-col grid--{% if section.settings.desktop_image_width == 'medium' %}2-col-tablet{% else %}3-col-tablet{% endif %}{% if section.settings.layout == 'text_first' %} image-with-text__grid--reverse{% endif %}">
|
||||
<div class="image-with-text__media-item image-with-text__media-item--{{ section.settings.desktop_image_width }} image-with-text__media-item--{{ section.settings.desktop_content_position }} grid__item">
|
||||
<div
|
||||
class="image-with-text__media image-with-text__media--{{ section.settings.height }} global-media-settings{% unless remove_color_classes %} gradient color-{{ section.settings.color_scheme }}{% else %} background-transparent{% endunless %}{% if section.settings.image != blank %} media{% else %} image-with-text__media--placeholder placeholder{% endif %}{% if section.settings.image_behavior != 'none' %} animate--{{ section.settings.image_behavior }}{% endif %}"
|
||||
{% if section.settings.height == 'adapt' and section.settings.image != blank %}
|
||||
style="padding-bottom: {{ 1 | divided_by: section.settings.image.aspect_ratio | times: 100 }}%;"
|
||||
{% endif %}
|
||||
>
|
||||
{%- if section.settings.image != blank -%}
|
||||
{%- if section.settings.image_behavior == 'ambient' or section.settings.image_behavior == 'zoom-in' -%}
|
||||
{%- assign widths = '198, 432, 642, 900, 1284, 1800' -%}
|
||||
{%- capture sizes -%}
|
||||
(min-width: {{ settings.page_width }}px) {{ settings.page_width | minus: 100 | divided_by: 1.6667 }}px,
|
||||
(min-width: 750px) calc((100vw - 130px) / 1.667), calc((100vw - 50px) / 1.667)
|
||||
{%- endcapture -%}
|
||||
{%- else -%}
|
||||
{%- assign widths = '165, 360, 535, 750, 1070, 1500' -%}
|
||||
{%- capture sizes -%}
|
||||
(min-width: {{ settings.page_width }}px) {{ settings.page_width | minus: 100 | divided_by: 2 }}px,
|
||||
(min-width: 750px) calc((100vw - 130px) / 2), calc((100vw - 50px) / 2)
|
||||
{%- endcapture -%}
|
||||
{%- endif -%}
|
||||
{{
|
||||
section.settings.image
|
||||
| image_url: width: 1500
|
||||
| image_tag: sizes: sizes, widths: widths, fetchpriority: fetch_priority
|
||||
}}
|
||||
{%- else -%}
|
||||
{{ 'detailed-apparel-1' | placeholder_svg_tag: 'placeholder-svg' }}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
</div>
|
||||
<div class="image-with-text__text-item grid__item">
|
||||
<div
|
||||
id="ImageWithText--{{ section.id }}"
|
||||
class="image-with-text__content image-with-text__content--{{ section.settings.desktop_content_position }} image-with-text__content--desktop-{{ section.settings.desktop_content_alignment }} image-with-text__content--mobile-{{ section.settings.mobile_content_alignment }} image-with-text__content--{{ section.settings.height }} content-container{% unless remove_color_classes %} gradient color-{{ section.settings.color_scheme }}{% else %} background-transparent{% endunless %}"
|
||||
>
|
||||
{%- for block in section.blocks -%}
|
||||
{% case block.type %}
|
||||
{%- when 'heading' -%}
|
||||
<h2
|
||||
class="image-with-text__heading inline-richtext {{ block.settings.heading_size }}"
|
||||
{{ block.shopify_attributes }}
|
||||
>
|
||||
{{ block.settings.heading }}
|
||||
</h2>
|
||||
{%- when 'caption' -%}
|
||||
<p
|
||||
class="image-with-text__text image-with-text__text--caption {{ block.settings.text_style }} {{ block.settings.text_style }}--{{ block.settings.text_size }} {{ block.settings.text_style }}"
|
||||
{{ block.shopify_attributes }}
|
||||
>
|
||||
{{ block.settings.caption | escape }}
|
||||
</p>
|
||||
{%- when 'text' -%}
|
||||
<div class="image-with-text__text rte {{ block.settings.text_style }}" {{ block.shopify_attributes }}>
|
||||
{{ block.settings.text }}
|
||||
</div>
|
||||
{%- when 'button' -%}
|
||||
{%- if block.settings.button_label != blank -%}
|
||||
<a
|
||||
{% if block.settings.button_link == blank %}
|
||||
role="link" aria-disabled="true"
|
||||
{% else %}
|
||||
href="{{ block.settings.button_link }}"
|
||||
{% endif %}
|
||||
class="button{% if block.settings.button_style_secondary %} button--secondary{% else %} button--primary{% endif %}"
|
||||
{{ block.shopify_attributes }}
|
||||
>
|
||||
{{ block.settings.button_label | escape }}
|
||||
</a>
|
||||
{%- endif -%}
|
||||
{%- endcase -%}
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcomment %}
|
||||
|
||||
{% schema %}
|
||||
{
|
||||
"name": "t:sections.image-with-text.name",
|
||||
|
|
Loading…
Reference in New Issue