Skip to content

Instantly share code, notes, and snippets.

View gideonb's full-sized avatar
🌵

Gideon B gideonb

🌵
View GitHub Profile
@gideonb
gideonb / custom.css
Created September 16, 2019 16:17
Fix about us height
#shopify-section-1564430610811 .image-with-text__image,
#shopify-section-1564430610811 .image-with-text__text{
min-height: 530px;
}
#shopify-section-1564430610811 .index-double{
height: auto;
}
@gideonb
gideonb / sections.js
Created January 30, 2019 01:19
Slate sections JS that accepts an array of JS contstructors
slate.Sections = function Sections() {
this.constructors = {};
this.instances = [];
$(document)
.on('shopify:section:load', this._onSectionLoad.bind(this))
.on('shopify:section:unload', this._onSectionUnload.bind(this))
.on('shopify:section:select', this._onSelect.bind(this))
.on('shopify:section:deselect', this._onDeselect.bind(this))
.on('shopify:section:reorder', this._onReorder.bind(this))
@gideonb
gideonb / product.liquid
Created April 8, 2017 23:48
split product description
<!-- /snippets/product.liquid -->
{% if product.template_suffix contains "charge-rabbit" %}
{% assign form_action = product.metafields.charge_rabbit.subscribe_path %}
{% assign form_method = 'get'%}
{% assign form_class = "charge-rabbit-product" %}
{% assign include_customer_id = true %}
{% assign membership_product = true %}
{% else %}
{% assign form_action = '/cart/add' %}
{% assign form_method = 'post'%}
@gideonb
gideonb / down-arrow.scss
Created February 4, 2017 00:29
Down arrow on grandparent
.grandparent > a{
position: relative;
&:after{
content: '';
position: absolute;
top: 47%;
right: -8px;
width: 0;
height: 0;
border-left: 2px solid transparent;
@gideonb
gideonb / js-load-hover.js
Created January 11, 2017 21:43
Faster load hover image
if (!Modernizr.touch){
$('img[data-src].collection__image__bottom').each(function(){
var src = $(this).data('src');
$(this).prop('src', src);
});
};
@gideonb
gideonb / product-related-items.liquid
Created September 22, 2016 21:20
Product related items update
@gideonb
gideonb / Instafeed.js
Created April 13, 2016 03:48
Updated Instafeed File
(function() {
var Instafeed;
Instafeed = (function() {
function Instafeed(params, context) {
var option, value;
this.options = {
target: 'instafeed',
get: 'popular',
resolution: 'thumbnail',
@gideonb
gideonb / shopify.md
Last active July 31, 2017 13:35 — forked from lambtron/shopify.md
This is an updated version of https://gist.github.com/lambtron/4a6ac9ab322e94f5bfc6 with a fix to properly track purchase events.

1: Add Your Snippet to All Pages

  • Folder: Layouts
  • File: theme.liquid

Add the following snippet to the line above the </head> tag on your main theme.liquid template file. Doing this will load the Segment javascript library (Analytics.js) on every page of your Shopify store.

Make sure you replace YOUR_WRITE_KEY with the write key found in your setup page (click on the wrench icon from inside your Segment project).

@gideonb
gideonb / Split a jekyll post
Created May 15, 2013 17:21
Split a jekyll post without a plugin
{% capture post_link %}<a href="{{ site.base_url }}{{ post.url }}"><h6>Read More</h6></a>{% endcapture %}
{% assign split_post = post.content | markdownify | split: '<!-- more -->' %}
<!-- Only append a "Read More" link if there is more to read -->
{% if split_post.size > 1 %}
{{ split_post | first | append: post_link }}
{% else %}
{{ split_post | first }}
{% endif %}
@gideonb
gideonb / hack.sh
Created April 4, 2012 18:48 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#