Skip to content

Instantly share code, notes, and snippets.

View whistlerbrad's full-sized avatar

Brad whistlerbrad

View GitHub Profile
@whistlerbrad
whistlerbrad / settings_data.json
Created June 8, 2019 21:23
Old version for tutorial example - Needs to be fixed
{
"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": "#3d5e8c",
@whistlerbrad
whistlerbrad / product-grid-item.liquid
Last active April 17, 2019 19:25
**Partial code** Adds pre-order tag in Pipeline. Replace first 49 lines of code with this.
{%- assign pre_order = false -%}
{%- assign pre_order_tag = false -%}
{% if product.tags contains 'pre-order' %}
{%- assign pre_order = true -%}
{%- assign pre_order_tag = true -%}
{% endif %}
{%- assign on_sale = false -%}
{%- if product.compare_at_price > product.price -%}
{%- assign on_sale = true -%}
@whistlerbrad
whistlerbrad / 1x1-lazy-load-image
Last active June 18, 2021 00:51
Story CSS overrides
/* -- Start Story override code removes background 1x1 image -- */
.template-product .lazy-image {background-image: none !important;}
/* - end - */
@whistlerbrad
whistlerbrad / linked-options
Created April 16, 2019 23:15
For Pipeline Tutorial - Linked Options
<script>
// (c) Copyright 2016 Caroline Schnapp. All Rights Reserved. Contact: mllegeorgesand@gmail.com
// See https://docs.shopify.com/themes/customization/navigation/link-product-options-in-menus
var Shopify = Shopify || {};
Shopify.optionsMap = {};
Shopify.updateOptionsInSelector = function(selectorIndex) {
switch (selectorIndex) {
case 0:
var key = 'root';
@whistlerbrad
whistlerbrad / page.wide.liquid
Created April 5, 2019 18:24
Pipeline page wide template
<!-- /templates/page.wide.liquid -->
{% section 'page-images' %}
<div class="wrapper page-margin">
<div class="grid">
<div class="grid__item one-whole">
<h1 class="text-center h2 templateTitle" style="display:none;">{{ page.title }}</h1>
<div class="rte">
{{ page.content }}
@whistlerbrad
whistlerbrad / page.liquid
Created April 5, 2019 18:24
Pipeline page template
<!-- /templates/page.liquid -->
{% section 'page-images' %}
<div class="wrapper page-margin">
<div class="grid">
<div class="grid__item large--two-thirds push--large--one-sixth">
<h1 class="text-center h2 templateTitle" style="display:none;">{{ page.title }}</h1>
<div class="rte">
{{ page.content }}
@whistlerbrad
whistlerbrad / pagination css
Created February 28, 2019 14:12
CSS for pagination
/*============================================================================
#Pagination (Including Shopify Product Reviews)
==============================================================================*/
.pagination {
margin-bottom: 1em;
}
/*================ Custom Pagination ================*/
.pagination-custom, .sky-pilot-pagination {
display: inline-block;
@whistlerbrad
whistlerbrad / theme.liquid
Created February 20, 2019 22:50
Bold quantity issue
<script id="JsQty" type="text/template">
{% raw %}
<div class="js-qty
<button {{readOnly}} type="button" class="js-qty__adjust js-qty__adjust--minus" data-id="{{id}}" data-qty="{{itemMinus}}">&minus;</button>
<input {{ bold_qty_attr }} type="text" class="js-qty__num QuantityInput" value="{{itemQty}}" min="1" data-id="{{id}}" aria-label="quantity" pattern="[0-9]*" name="{{inputName}}" id="{{inputId}}" data-submit="{{submit}}">
<button {{readOnly}} type="button" class="js-qty__adjust js-qty__adjust--plus" data-id="{{id}}" data-qty="{{itemAdd}}">+</button>
</div>
{% endraw %}
</script>
<script id="JsQty--cart" type="text/template">
@whistlerbrad
whistlerbrad / settings_data.json
Created January 8, 2019 21:02
Surf Pipeline with Global tabs
{
"current": {
"color_account_bg": "#dddddd",
"color_account_text": "#656565",
"color_header_bg": "#ffffff",
"color_header_text": "#2e3438",
"color_body_bg": "#ffffff",
"color_body_text": "#656565",
"color_primary": "#359ac8",
"color_splash": "#f4a482",
@whistlerbrad
whistlerbrad / index-instagram-x.liquid
Last active November 30, 2018 06:29 — forked from odessy/index-instagram.liquid
add instagram username to generate URL in index-instagram-x.liquid
{% assign instagram_grid_width_large = 'large--one-sixth' %}
{% assign instagram_grid_width_medium = 'medium--one-third' %}
{% assign instagram_grid_width_small = 'small--one-half' %}
{% case section.settings.instagram_grid_setting_large %}
{% when 2 %}
{% assign instagram_grid_width_large = 'large--one-half' %}
{% when 3 %}
{% assign instagram_grid_width_large = 'large--one-third' %}
{% when 4 %}