Skip to content

Instantly share code, notes, and snippets.

Last active June 29, 2018 19:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
{% if forloop.index == 2 and section.settings.collection-ad-text_richtext != '' or forloop.index == 2 and section.settings.collection-image %}
<div id="gridparentad" class="grid__item collection-ad-mobile margin-B-M {{ collection_products_per_row }} quarter-width product-square-grid-ad medium--one-half ff small--one-whole product-grid-square">
<div id="dummy"></div>
<div class="{%if section.settings.collection-image == blank %} collection-page-ad{% endif %}
card-shadow collection-product collection-box-1
{%if section.settings.collection-image != blank %}grid__image col-image{%endif%}
" id="element">
{%if section.settings.collection-image%}
{%if section.settings.collection-ad-link != blank%}
<a href="{{section.settings.collection-ad-link}}">
<img src="{{ section.settings.collection-image| img_url: '1024x1024' }}">
{%if section.settings.collection-ad-link != blank%}
<div class="product-overlay" style="margin:0;">
<div class="product-grid-card-link">
{{ section.settings.collection-ad-text_richtext | truncatewords:10 }}
<div class="collection-ad-text rte">
<h1>{{ section.settings.collection-ad-text_richtext }}</h1>
{% endif %}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment