Shopify / shopify.github.com

A collection of the open source projects by Shopify
https://shopify.github.io
MIT License
508 stars 113 forks source link

A #117

Open mandurz opened 11 months ago

mandurz commented 11 months ago

{%- if section.settings.slideshow_height == 'adapt' -%} {% comment %} 'min_aspect_ratio' is the minimum aspect ratio of images shown without whitespace when 'slideshow_height' is set to 'adapt'. The aspect ratio values for the first image in the slideshow will be used unless it is blank, in that case a ratio of 2:1 will be used. {% endcomment %}

{%- assign first_block = section.blocks[0] -%} {%- if first_block.settings.image.aspect_ratio == blank -%} {%- assign min_aspect_ratio = 2.0 -%} {%- else -%} {%- assign min_aspect_ratio = first_block.settings.image.aspect_ratio -%} {%- endif -%} {% assign wrapper_height = 100 | divided_by: min_aspect_ratio %} {%- endif -%}

{%- assign text_alignments = section.settings.text_alignment | split: ' ' -%} {%- assign text_horizontal_alignment = text_alignments.first -%} {%- assign text_vertical_alignment = text_alignments.last | strip -%}

{%- if section.blocks.size > 0 -%}
{%- for block in section.blocks -%} {%- assign block_image = block.settings.image -%}
{% if block_image == blank %}
{% capture current %}{% cycle 1, 2 %}{% endcapture %} {{ 'lifestyle-' | append: current | placeholder_svg_tag: 'placeholder-svg' }}
{% if section.settings.show_overlay %}
{% endif %}
{% else %} {% endif %}
jlepp commented 11 months ago

Can you clarify the issue?