Skip to content

Instantly share code, notes, and snippets.

@gkobilansky
Last active January 24, 2017 21:36
Show Gist options
  • Save gkobilansky/d500ba91523e66d85f5d713b5b31c985 to your computer and use it in GitHub Desktop.
Save gkobilansky/d500ba91523e66d85f5d713b5b31c985 to your computer and use it in GitHub Desktop.
<div class="flexslider" id="flexslider--{{ section.id }}" data-section-id="{{ section.id }}" data-section-type="slideshow-section" data-transition="{{ section.settings.slider_home_transition }}" data-autoplay="{{ section.settings.slider_home_auto }}" data-speed="{{ section.settings.slider_home_rate }}" data-show-dots="{{ section.settings.slider_home_show_dots }}">
<ul class="slides">
{% for block in section.blocks %}
{% if block.settings.image != blank %}
<li id="slide--{{ block.id }}" data-flexslider-index="{{ forloop.index0 }}" {{ block.shopify_attributes }}>
{% if block.settings.link != blank %}
{% if block.setting.link contains 'http' %}
<a href="{{ block.settings.link }}" class="slide-link slide-link--{{ block.id }}" target="_blank">
{% else %}
<a href="{{ block.settings.link }}" class="slide-link slide-link--{{ block.id }}">
{% endif %}
{% endif %}
{{ block.settings.image | img_url: '2048x' | img_tag: block.settings.image.alt }}
{% if block.settings.link != blank %}</a>{% endif %}
</li>
{% else %}
<li id="slide--{{ block.id }}" data-flexslider-index="{{ forloop.index0 }}" {{ block.shopify_attributes }}>
<span class="slide-link slide-link--{{ block.id }}">
{% capture current %}{% cycle 1, 2 %}{% endcapture %}
{{ 'lifestyle-' | append: current | placeholder_svg_tag: 'placeholder-svg' }}
</span>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment