Skip to content

Instantly share code, notes, and snippets.

View kyledurand's full-sized avatar
👋
🌝

Kyle Durand kyledurand

👋
🌝
View GitHub Profile
@kyledurand
kyledurand / gist:11193171
Last active August 29, 2015 14:00
Importing a web font using @font-face in shopify's liquid
@font-face {
font-family: 'font';
src: url('{{ 'font.eot' | asset_url }}');
src: url('{{ 'font.eot' | asset_url }}?#iefix') format('eot'),
url('{{ 'font.woff' | asset_url }}') format('woff'),
url('{{ 'font.ttf' | asset_url }}') format('truetype'),
url('{{ 'font.svg' | asset_url }}') format('svg');
font-weight: normal;
font-style: normal;
}
@kyledurand
kyledurand / gist:186f5a48b527e78eba10
Created May 29, 2014 19:40
Sub Collection using link list
<!-- Begin Sub Colections -->
{% if collection.handle == 'shoei' %}
{% if linklists.shoei.links.size > 0 %}
<!-- BEGIN table.products -->
<table class="products">
{% tablerow link in linklists.shoei.links cols: 8 %}
<div>
<a href="{{ link.url }}" title="Browse our {{ link.object.title | escape }} collection.">
<img src="{{ link.object.products.first.featured_image | product_img_url: 'micro' }}" width="auto" alt="{{ link.object.title | escape }}" />
<p style="text-align:center;">{{ link.title }}</p>
@kyledurand
kyledurand / gist:87898afb7c09288e97c4
Created July 9, 2014 21:36
Responsive Fix for Envy
First unminify bootstrap.min.css
Add this css to line 551 of bootstrap.min.css
/* added by kyle @ shopify */
.col-lg-6{
width:50%;
float:left;
}
.col-lg-3{
@kyledurand
kyledurand / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@kyledurand
kyledurand / 1-instructions.md
Last active December 22, 2021 16:39
[Supply] Sub Dropdown Menus

OUTDATED - Use only as inspiration

Nested / Sub Dropdown Menu for (Almost) Any Shopify theme Based off of Timber

  1. Replace site-nav.liquid with the snippet below.
  2. Add the styles below to timber.scss.liquid.
  3. Go make popcorn.
  4. Check your homepage to see if this has worked.
  5. It didn't work.
  6. Eat the popcorn and try to figure out what went wrong.
@kyledurand
kyledurand / product.liquid
Last active August 29, 2015 14:11
Allow for featured image to be displayed by default in variant images core
{% assign featured_image = product.featured_image | default: product.featured_image %}
@kyledurand
kyledurand / instruction.md
Last active August 29, 2015 14:11
[Launchpad] Turn product page images into fancybox gallery

Turning a product page into a fancybox gallery

  1. Find the fancybox code in scripts.js. If your theme doesn't have fancy box loaded then load it up and add the sprites.

  2. Find the code, it should look something like this:

$("a.zoom").fancybox({ padding:0, 'titleShow': false, overlayColor: '#000000',

@kyledurand
kyledurand / instructions.md
Last active August 29, 2015 14:11
Changing the label text on responsive checkout

Changing label text on payement gateway

  1. Add this to checkout.scss.liquid

label[for="checkout_payment_gateway_10121035"]{visibility:hidden;} label[for="checkout_payment_gateway_10121035"]:before{content:' Uberweisung / Sofort.com '; visibility: visible;}

@kyledurand
kyledurand / currencies.js
Last active August 29, 2015 14:12
Updating cart drawer info
var cc = Currency.currentCurrency;
$( document ).ajaxComplete(function() {
if (Currency.currentCurrency.length == 0){
jQuery('.selected-currency').text(cc);
} else {
jQuery('.selected-currency').text(Currency.currentCurrency);
}
});
@kyledurand
kyledurand / 1.instructions.md
Last active May 10, 2020 22:06
Lookbook – Advanced Filtering

Advanced Filtering for Lookbook

Preface: This needs a lot of cleaning up but on the front end it's beautiful.

Add the icons font from the supply theme. This will work without the icons font.

Add the filters.liquid file to your snippets folder. Include the snippet on the collections.liquid page

See demo here for a limited time: http://simplejacktest.myshopify.com/collections/all