test
parent
e4bad955a5
commit
f4ee05ee08
|
@ -67,21 +67,18 @@
|
||||||
role="list">
|
role="list">
|
||||||
|
|
||||||
{% assign media_position = 0 %}
|
{% assign media_position = 0 %}
|
||||||
{% assign model_index = 0 %}
|
{% assign first_videoShown = false %}
|
||||||
{% assign video_index = 0 %}
|
|
||||||
{% assign image_index = 0 %}
|
|
||||||
{% assign first_video = product.media | where: 'media_type', 'video' | first %}
|
|
||||||
|
|
||||||
<p>first_video: {{ first_video }}</p>
|
|
||||||
|
|
||||||
|
|
||||||
{%- for media in product.media -%}
|
{%- for media in product.media -%}
|
||||||
{%- unless media.id == product.selected_or_first_available_variant.featured_media.id -%}
|
{%- unless media.id == product.selected_or_first_available_variant.featured_media.id -%}
|
||||||
|
{% assign isCorrectImageWithMatchingAlt = !(product.selected_or_first_available_variant.featured_image.alt ! = media.alt and product.selected_or_first_available_variant.featured_image.alt ! = blank) %}
|
||||||
|
|
||||||
<li
|
<li
|
||||||
id="Slide-{{ section.id }}-{{ media.id }}{{ id_append }}"
|
id="Slide-{{ section.id }}-{{ media.id }}{{ id_append }}"
|
||||||
class="product__media-item grid__item slider__slide{% if single_media_visible %} product__media-item--single{% endif %}{% if media == first_video %} is-active{% endif %}{% if media.media_type != 'image' %} product__media-item--full{% endif %}{% if section.settings.hide_variants and variant_images contains media.src %} product__media-item--variant{% endif %}{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--fade-in{% endif %}"
|
class="product__media-item grid__item slider__slide{% if single_media_visible %} product__media-item--single{% endif %}{% if isCorrectImageWithMatchingAlt == true and first_videoShown == false and media.media_type == "video" %} is-active{% endif %}{% if media.media_type != 'image' %} product__media-item--full{% endif %}{% if section.settings.hide_variants and variant_images contains media.src %} product__media-item--variant{% endif %}{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--fade-in{% endif %}"
|
||||||
data-media-id="{{ section.id }}-{{ media.id }}"
|
data-media-id="{{ section.id }}-{{ media.id }}"
|
||||||
{% if product.selected_or_first_available_variant.featured_image.alt != media.alt and product.selected_or_first_available_variant.featured_image.alt != blank %}
|
{% if !isCorrectImageWithMatchingAlt %}
|
||||||
style="display: none;"
|
style="display: none;"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
thumbnail-alt-mobile={{ media.alt }}>
|
thumbnail-alt-mobile={{ media.alt }}>
|
||||||
|
|
Loading…
Reference in New Issue