Skip to content

Instantly share code, notes, and snippets.

View whistlerbrad's full-sized avatar

Brad whistlerbrad

View GitHub Profile
<!-- /sections/collection-custom-heading.liquid -->
{%- assign grid_offset = '' -%}
{%- assign products_count = collection.products_count -%}
{%- case section.settings.grid_setting_large -%}
{%- when 1 -%}
{%- assign grid_width_large = 'large--one-whole' -%}
{%- when 2 -%}
{%- assign grid_width_large = 'large--one-half' -%}
{%- if products_count == 1 -%}
@whistlerbrad
whistlerbrad / product-grid-item.liquid
Last active August 31, 2018 21:44
Hide sold out prices from product grids
<p class="price_wrapper">
<span class="price{% if on_sale %} on-sale{% endif %}">
{% if product.price_varies %}{{ 'products.general.from' | t }} {% endif %}
{% unless sold_out %} <span class="money">{{ product.price | money }}</span>
</span> {% endunless %}
{% if sold_out %}
<em>{{ 'products.product.sold_out' | t }}</em>
{% endif %}
{% if on_sale %}
<div class="product-excerpt" data-content-field="excerpt"><strong>HOLISTIC MOOD ENHANCING BEAUTY™</strong></div>
<div class="product-excerpt" data-content-field="excerpt"></div>
<div class="product-excerpt" data-content-field="excerpt"><meta charset="utf-8" /><meta charset="utf-8" />
<p>Mood Mists™ are mood-enhancing facial toners that promote fresh skin and a fresh perspective.  This best-selling dynamic mist purifies the skin and supports mindfulness.  </p>
<meta charset="utf-8" />
<pre class="callout-green">[split]</pre>
<p><strong>INGREDIENTS: </strong><em>Distilled Water, Neroli (Citrus aurantium) Floral Water, Lactobacillus Ferment (Radish Root Extract). Essential oils of Bergamot (Citrus bergamia), White Spruce (Picea glauca), Pinon Pine (Pinus edulis), Clary Sage (Salvia sclarea) &amp; Rose Otto (Rosa damascena)</em> </p>
<meta charset="utf-8" />
<p><strong>RITUAL:</strong><em> </em><em>Close the eyes and spray above the head and face. Allow the mist to gently fall, cleansing the skin &amp; nourishing
@whistlerbrad
whistlerbrad / cart.liquid
Created August 21, 2018 17:23
Clean - Pipeline 3.1
<!-- /templates/cart.liquid -->
{% comment %}
This is your /cart template. If you are using the Ajaxify Cart plugin,
your form (with action="/cart") layout will be used in the drawer/modal.
For info on test orders:
- General http://docs.shopify.com/manual/your-store/orders/test-orders
- Shopify Payments - http://docs.shopify.com/manual/more/shopify-payments/testing-shopify-payments
@whistlerbrad
whistlerbrad / page-slideshow-1
Created August 16, 2018 00:12
Pipeline 3 version
<div class="homepage-slideshow {{ section.settings.height }}" data-section-id="{{ section.id }}" data-section-type="slideshow">
{% if section.blocks.size > 0 %}
<div id="slideshow-{{ section.id }}" data-autoplay="{{ section.settings.autoplay }}" data-speed="{{ section.settings.autoplay_speed | times: 1000 }}">
{% for block in section.blocks %}
<div class="slick-slide slideshow__slide slideshow__slide--{{ block.id }} preventOverflow homepage-image {{ block.settings.color }}" {{ block.shopify_attributes }} data-color="{{ block.settings.color }}">
{%- if block.settings.image -%}
{%- assign slide_image = block.settings.image | img_url: '1800x' -%}
{%- else -%}
{%- assign slide_image = 'blank.svg' | asset_url -%}
{%- endif -%}
@whistlerbrad
whistlerbrad / page-slideshow-1
Created August 16, 2018 00:11
Pipeline 4 version
<div class="homepage-slideshow {{ section.settings.height }}" data-section-id="{{ section.id }}" data-section-type="slideshow">
{% if section.blocks.size > 0 %}
<div id="slideshow-{{ section.id }}" data-autoplay="{{ section.settings.autoplay }}" data-speed="{{ section.settings.autoplay_speed | times: 1000 }}">
{% for block in section.blocks %}
<div class="slick-slide slideshow__slide slideshow__slide--{{ block.id }} preventOverflow homepage-image {{ block.settings.color }}" {{ block.shopify_attributes }} data-color="{{ block.settings.color }}">
{%- if block.settings.image -%}
{%- assign img_object = block.settings.image -%}
{%- assign img_small = block.settings.image | img_url: '18x' -%}
{%- assign img_api = block.settings.image | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%}
{%- else -%}
@whistlerbrad
whistlerbrad / page-slideshow-1
Created August 16, 2018 00:08
Pipeline 4.2 version
<div class="homepage-slideshow {{ section.settings.height }}" data-section-id="{{ section.id }}" data-section-type="slideshow">
{% if section.blocks.size > 0 %}
<div id="slideshow-{{ section.id }}" data-autoplay="{{ section.settings.autoplay }}" data-speed="{{ section.settings.autoplay_speed | times: 1000 }}">
{% for block in section.blocks %}
<div class="slick-slide slideshow__slide slideshow__slide--{{ block.id }} preventOverflow homepage-image {{ block.settings.color }}" {{ block.shopify_attributes }} data-color="{{ block.settings.color }}">
{%- if block.settings.image -%}
{%- assign img_object = block.settings.image -%}
{%- assign img_small = block.settings.image | img_url: '18x' -%}
{%- assign img_api = block.settings.image | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%}
{%- else -%}
@whistlerbrad
whistlerbrad / page-banner-1.liquid
Created August 15, 2018 23:52
Pipeline 4.2 version
{%- if section.settings.image -%}
{%- assign img_object = section.settings.image -%}
{%- assign img_small = section.settings.image | img_url: '18x' -%}
{%- assign img_api = section.settings.image | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%}
{%- else -%}
{%- assign img_object = 'blank.svg' | asset_url -%}
{%- assign img_small = 'blank.svg' | asset_url -%}
{%- assign img_api = 'blank.svg' | asset_url -%}
{%- endif -%}
<div class="homepage-image fade-in-child preventOverflow {{ section.settings.height }} {{ section.settings.color }}" data-section-id="{{ section.id }}" data-section-type="parallax" id="FeaturedImage-{{ section.id }}"
<!-- /sections/index-code.liquid -->
<div class="rte">
{% if section.settings.code != blank %}
{{ section.settings.code }}
{% else %}
{{ 'home_page.onboarding.no_content' | t }}
{% endif %}
</div>
@whistlerbrad
whistlerbrad / theme.scss.liquid
Last active August 14, 2018 19:19
CSS for full-width product and description above
/* -- code to force full-width product pages -- */
@include at-query($max, $small) {
.product-description {padding-left: 30px;padding-right: 30px;}
}
.product-description--below {margin-top: 0px; }
/* - end - */