Skip to content

Instantly share code, notes, and snippets.

@sadiesaurus
sadiesaurus / related-products.liquid
Created May 9, 2017 12:43
related-products.liquid for sectioned themes
@sadiesaurus
sadiesaurus / jquery.currencies.min.js
Created May 1, 2017 17:16
jquery.currencies.min.js
/*
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
@sadiesaurus
sadiesaurus / back-to-the-top.html
Last active October 12, 2020 11:55 — forked from carolineschnapp/new_gist_file.html
Back to the top snippet
{% comment %}
Reduce below value if you need the back to the top button to appear higher up on the page.
That value is in pixels.
{% endcomment %}
{% assign vertical_offset_for_trigger = 300 %}
{% comment %}
Vertical offset from bottom of browser for the position of the button.
{% endcomment %}
{% assign position_from_bottom = '4em' %}
<a href="#" title="Back to the top" class="back-to-top">
@sadiesaurus
sadiesaurus / product.template.liquid
Last active February 19, 2021 17:47
product-template.liquid for sectioned Brooklyn with variant drop-down menus
<!-- /templates/product.liquid -->
<div itemscope itemtype="http://schema.org/Product" id="ProductSection" data-section-id="{{ section.id }}" data-section-type="product-template" data-image-zoom-type="{{ section.settings.zoom_enable }}" data-enable-history-state="true">
<div itemscope itemtype="http://schema.org/Product">
<meta itemprop="url" content="{{ shop.url }}{{ product.url }}">
<meta itemprop="image" content="{{ product.featured_image.src | img_url: 'grande' }}">
{% assign current_variant = product.selected %}
<div class="grid product-single">
@sadiesaurus
sadiesaurus / product-template.liquid
Created July 13, 2017 20:42
Product template for showing featured image before a variant is selected in sectioned Brooklyn
<!-- /templates/product.liquid -->
<div itemscope itemtype="http://schema.org/Product" id="ProductSection" data-section-id="{{ section.id }}" data-section-type="product-template" data-image-zoom-type="{{ section.settings.zoom_enable }}" data-enable-history-state="true">
<div itemscope itemtype="http://schema.org/Product">
<meta itemprop="url" content="{{ shop.url }}{{ product.url }}">
<meta itemprop="image" content="{{ product.featured_image.src | img_url: 'grande' }}">
{% if product.variants.size > 1 %}
{% assign current_variant = product.selected %}
{% else %}
@sadiesaurus
sadiesaurus / page.list-collections.liquid
Last active November 17, 2021 22:42 — forked from carolineschnapp/page.list-collections.liquid
To add at the bottom of page.list-collections.liquid. In the New Standard theme, use the content of page.full-width.liquid and copy the code at the bottom of that content. This won't work in the Lookbook, Brooklyn, Simple and Kickstand themes.
{% comment %}
Collections are listed here.
{% endcomment %}
{% capture uses_minimal_framework %}{% include 'product-loop' %}{% endcapture %}
{% if uses_minimal_framework contains 'Liquid error' %}
{% assign uses_minimal_framework = false %}
{% assign grid_item_width = 'large--one-quarter large-up--one-quarter medium--one-third medium-up--one-third small--one-half large--col-3 medium--col-4 small--col-6' %}
{% else %}