Skip to content

Instantly share code, notes, and snippets.

View whistlerbrad's full-sized avatar

Brad whistlerbrad

View GitHub Profile
@whistlerbrad
whistlerbrad / product.liquid
Last active August 14, 2018 19:21
Custom 4.2 for Product description above when using full width modification
<div itemscope itemtype="http://schema.org/Product" class="product-page">
<div class="wrapper">
<meta itemprop="url" content="{{ shop.url }}{{ product.url }}">
<meta itemprop="image" content="{{ product.featured_image.src | img_url: 'grande' }}">
{% if section.settings.product_breadcrumbs %}
{% include 'breadcrumb' %}
{% endif %}
@whistlerbrad
whistlerbrad / theme.js
Created August 14, 2018 18:01
Clean - Pipeline 4.2
window.slate = window.slate || {};
window.theme = window.theme || {};
window.timber = window.timber || {};
/*================ Vendor ================*/
/*! lazysizes - v4.0.0 */
!function(a,b){var c=function(){b(a.lazySizes),a.removeEventListener("lazyunveilread",c,!0)};b=b.bind(null,a,a.document),"object"==typeof module&&module.exports?b(require("lazysizes")):a.lazySizes?c():a.addEventListener("lazyunveilread",c,!0)}(window,function(a,b,c){"use strict";if(a.addEventListener){var d=a.requestAnimationFrame||setTimeout,e=function(){var f,g,h,i,j=c.cfg,k={"data-bgset":1,"data-include":1,"data-poster":1,"data-bg":1,"data-script":1},l="(\\s|^)("+j.loadedClass,m=b.documentElement,n=function(a){d(function(){c.rC(a,j.loadedClass),j.unloadedClass&&c.rC(a,j.unloadedClass),c.aC(a,j.lazyClass)})},o=function(a){var b,c,d,e;for(b=0,c=a.length;c>b;b++)d=a[b],e=d.target,e.getAttribute(d.attributeName)&&("source"==e.localName&&e.parentNode&&(e=e.parentNode.querySelector("img")),e&&l.test(e.className)&&n(e))};j.unloadedClass
@whistlerbrad
whistlerbrad / theme.liquid
Created August 14, 2018 18:00
Clean - Pipeline 4.2
<!doctype html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if IE 9 ]><html class="ie9 no-js"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<!-- ======================= Pipeline Theme V4.2 ========================= -->
<meta charset="utf-8">
@whistlerbrad
whistlerbrad / product.liquid
Created August 10, 2018 22:50
Pipeline 3.1 original
<!-- /snippets/product.liquid -->
{% if product.template_suffix contains "charge-rabbit" %}
{% assign form_action = product.metafields.charge_rabbit.subscribe_path %}
{% assign form_method = 'get'%}
{% assign form_class = "charge-rabbit-product" %}
{% assign include_customer_id = true %}
{% assign membership_product = true %}
{% else %}
{% assign form_action = '/cart/add' %}
{% assign form_method = 'post'%}
@whistlerbrad
whistlerbrad / product.liquid
Created August 10, 2018 21:57
Non-responsive images version - Snippet file
<div itemscope itemtype="http://schema.org/Product" class="product-page">
<div class="wrapper">
<meta itemprop="url" content="{{ shop.url }}{{ product.url }}">
<meta itemprop="image" content="{{ product.featured_image.src | img_url: 'grande' }}">
{% if section.settings.product_breadcrumbs %}
{% include 'breadcrumb' %}
{% endif %}
@whistlerbrad
whistlerbrad / settings_data.json
Created August 10, 2018 00:05
Clean for Pipeline 4.2
{
"current": {
"color_account_bg": "#f3f3f3",
"color_account_text": "#656565",
"color_header_bg": "#ffffff",
"color_header_text": "#656565",
"color_body_bg": "#ffffff",
"color_body_text": "#656565",
"color_primary": "#585e71",
"color_splash": "#f4a482",
{%- assign product_img_url = product.featured_image.src | img_url: '700x' -%}
{%- if grid_width_large == 'large--one-whole' -%}
{%- assign product_img_url = product.featured_image.src | img_url: '1200x' -%}
{%- elsif grid_width_large == 'large--one-half' -%}
{%- assign product_img_url = product.featured_image.src | img_url: '900x' -%}
{%- endif -%}
{%- assign on_sale = false -%}
{%- if product.compare_at_price > product.price -%}
{%- assign on_sale = true -%}
@whistlerbrad
whistlerbrad / product-grid-item.liquid
Created August 2, 2018 23:50
4.2 Lazy load removed
{%- assign on_sale = false -%}
{%- if product.compare_at_price > product.price -%}
{%- assign on_sale = true -%}
{%- endif -%}
{%- assign sold_out = true -%}
{%- if product.available -%}
{%- assign sold_out = false -%}
{%- endif -%}
@whistlerbrad
whistlerbrad / blog post
Last active August 1, 2018 23:46
For Dustin
<p>California's Central Coast is teeming with talented breweries capable of creating beyond fantastic beer. From Firestone to Sante, there is no trouble finding a world class beer and chill spot to drink it at. Pair all the great breweries with golden rolling hills, pristine beaches and all the good vibes one could ask for, and it makes for one enjoyable road trip. Coming from the bustle of Southern California, everything is more laid back up here and time just seems to tick a little slower. Less worries, more beer. </p>
<p>There are far more fantastic breweries than we could hit but these are the ones we made it to. For this pursuit, we started south in Buellton and made our way north to Santa Cruz with stops at Firestone Barrelworks, Alvarado Street and more.</p>
<div class="text-center blog-images">
<p><img alt="" src="//cdn.shopify.com/s/files/1/1952/3481/files/1_2048x2048.jpg?v=1531697258" /></p>
<p><img alt="" src="//cdn.shopify.com/s/files/1/1952/3481/files/3_2048x2048.jpg?v=1531697557" /></p>
<p><im
{% assign product = all_products[section.settings.home_product] %}
{% if product.empty? %}
<div class="homepage-product product-section {{ section.settings.homepage_product_color }}">
{% unless section.settings.title == '' %}
<h4 class="home__subtitle">{{ section.settings.title | escape }}</h4>
{% endunless %}
{% include 'onboarding-product' %}
</div>
{% else %}