Skip to content

Instantly share code, notes, and snippets.

View patrickbolle's full-sized avatar

Patrick Bollenbach patrickbolle

View GitHub Profile
/*============================================================================
Ajax the add to cart experience by revealing it in a side drawer
Plugin Documentation - http://shopify.github.io/Timber/#ajax-cart
(c) Copyright 2015 Shopify Inc. Author: Carson Shold (@cshold). All Rights Reserved.
This file includes:
- Basic Shopify Ajax API calls
- Ajax cart plugin
This requires:

Keybase proof

I hereby claim:

  • I am patrickbolle on github.
  • I am patb (https://keybase.io/patb) on keybase.
  • I have a public key ASDiuxl2kExRnKlzdap_LO-rA1s_aay8OmpaGBLlWrtJEwo

To claim this, I am signing this object:

{%- comment %}
For "Double Block" Section
{% endcomment -%}
<div class="hero-image-outer">
<div class="hero-image">
<div class="image-slider">
{% for block in section.blocks %}
{% if block.type == 'block-1' %}
@patrickbolle
patrickbolle / index.js
Created August 7, 2020 13:34 — forked from tobiasdalhof/index.js
Shopify JS Variant Listener
/**
* This class contains general helper methods.
*/
class Helper {
/**
* @param {String} name
* @returns {String|null}
*/
static getQueryParameter(name) {
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]')
.rte .social-sharing{margin:0;list-style:none;padding-top:10px}#frameToPrint{display:none}#rk_parent *::after{display:none}#rk_parent .rk_modern{position:relative;display:block !important}#rk_parent .rk_modern .rk_container{width:100%;max-width:1000px;padding:15px;border:1px solid black}@media only screen and (min-width: 1024px){#rk_parent .rk_modern .rk_container{padding:25px}}#rk_parent .rk_modern .rk_container .rk_heading{width:100%;margin-bottom:5px;margin-top:0;padding-top:0;border:0;font-size:30px;text-align:left;line-height:1;margin-bottom:10px}#rk_parent .rk_modern .rk_container .rk_subheading{line-height:1;margin-top:0px;border:0}#rk_parent .rk_modern .rk_container .rk_meta{margin-top:0;font-size:17px;margin-bottom:5px;font-weight:bold;text-align:left;border:0;line-height:1}@media only screen and (min-width: 1024px){#rk_parent .rk_modern .rk_container .rk_meta{margin-bottom:10px}}#rk_parent .rk_modern .rk_container ul,#rk_parent .rk_modern .rk_container li,#rk_parent .rk_modern .rk_container p,#rk_pa
{%- assign rk_resource_id = article.id | downcase -%}
{%- assign rk_mf = article.metafields.recipekit[rk_resource_id] -%}
{%- assign rk_settings = shop.metafields.recipekit.settings -%}
{%- if rk_settings.widget_status == 'enabled' and rk_mf != blank -%}
{{- 'recipekit.css' | asset_url | stylesheet_tag -}}
{%- assign recipe_design = rk_settings.recipe_design -%}
{%- assign design_colour = rk_settings.design_colour -%}
{%- assign current_rating = rk_mf.recipe_rating | ceil | default: 5 | at_most: 5 -%}
{%- assign current_decimal_rating = rk_mf.recipe_rating | round: 1 | default: 5 | at_most: 5 -%}
{%- assign rating_count = rk_mf.rating_count | default: '1' | at_least: '1' -%}
{%- liquid
assign og_wait_li_product_id = product.id | downcase
assign og_wait_li_product_metafield = product.metafields.wait_li[og_wait_li_product_id]
assign new_wait_li_product_id = product.selected_or_first_available_variant.id | downcase
assign new_wait_li_product_metafield = product.selected_or_first_available_variant.metafields.wait_li[new_wait_li_product_id]
if og_wait_li_product_metafield
assign wait_li_product_metafield = og_wait_li_product_metafield
assign wait_li_product_id = og_wait_li_product_id
else
assign wait_li_product_metafield = new_wait_li_product_metafield
.rte .social-sharing{margin:0;list-style:none;padding-top:10px}#frameToPrint{display:none}#rk_parent *::after{display:none}#rk_parent .rk_modern{position:relative;display:block !important}#rk_parent .rk_modern .rk_container{width:100%;max-width:1000px;padding:15px;border:1px solid #000}@media only screen and (min-width: 1024px){#rk_parent .rk_modern .rk_container{padding:25px}}#rk_parent .rk_modern .rk_container .rk_heading{width:100%;margin-bottom:5px;margin-top:0;padding-top:0;border:0;font-size:30px;text-align:left;line-height:1;margin-bottom:10px}#rk_parent .rk_modern .rk_container .rk_subheading{line-height:1;margin-top:0px;border:0}#rk_parent .rk_modern .rk_container .rk_meta{margin-top:0;font-size:17px;margin-bottom:5px;font-weight:bold;text-align:left;border:0;line-height:1}@media only screen and (min-width: 1024px){#rk_parent .rk_modern .rk_container .rk_meta{margin-bottom:10px}}#rk_parent .rk_modern .rk_container ul,#rk_parent .rk_modern .rk_container li,#rk_parent .rk_modern .rk_container p,#rk_par
{% comment %}
Wait.li Logic File
DO NOT TOUCH THIS FILE.
{% endcomment %}
{% assign og_wait_li_product_id = product.id | downcase %}
{% assign new_wait_li_product_id = product.selected_or_first_available_variant.id | downcase %}
{% assign og_wait_li_product_metafield = product.metafields.wait_li[og_wait_li_product_id] %}
{% assign new_wait_li_product_metafield = product.selected_or_first_available_variant.metafields.wait_li[new_wait_li_product_id] %}
{% if og_wait_li_product_metafield %}
@patrickbolle
patrickbolle / filter.css
Last active September 17, 2024 16:14
filter.js
#rk_filter {
display: none; /* hide filter by default */
flex-wrap: wrap;
justify-content: center;
margin: 20px 0;
}
#rk_filter select {
margin: 0 5px;
padding: 10px 15px;