Skip to content

Instantly share code, notes, and snippets.

@sadiesaurus
sadiesaurus / search-autocomplete.liquid
Created June 21, 2017 17:09
search-autocomplete.liquid snippet
{% comment %} Width of results box {% endcomment %}
{% assign results_box_width = '242px' %}
{% comment %} Background color of results box {% endcomment %}
{% assign results_box_background_color = '#ffffff' %}
{% comment %} Border color of results box {% endcomment %}
{% assign results_box_border_color = '#d4d4d4' %}
<!-- Some styles to get you started. -->
<style>
.search-results {
@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 / related-products.liquid
Last active August 2, 2017 17:27
related products with lazyload for Boundless
@sadiesaurus
sadiesaurus / related-products.liquid
Created August 2, 2017 00:27
related products for Jumpstart with lazyload
@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 %}