Skip to content

Instantly share code, notes, and snippets.

View Chrisedmo's full-sized avatar

Chris Mousdale Chrisedmo

View GitHub Profile
@Chrisedmo
Chrisedmo / slim-html5-boilerplate
Created September 14, 2012 13:10 — forked from ravidsrk/slim-html5-boilerplate
Slim HTML5 Boilerplate
doctype html
/[if lt IE 7]
html.no-js.ie6.oldie lang="en"
/[if IE 7]
html.no-js.ie7.oldie lang="en"
/[if IE 8]
html.no-js.ie8.oldie lang="en"
/[if gte IE 8]
html.no-js lang="en"
head
@Chrisedmo
Chrisedmo / snippet-fb-open-graph-tags.liquid
Created August 21, 2012 11:12
Shopify: Facebook OG Tags
{% comment %}
This is for widgets that share content on Facebook.
See the Facebook Linter: http://developers.facebook.com/tools/debug
{% endcomment %}
{% if template contains 'product' %}
<meta property="og:url" content="{{ shop.url }}{{ product.url }}" />
<meta property="og:title" content="{{ product.title }}" />
<meta property="og:description" content="{{ product.description | strip_html | truncatewords: 100, '' | escape }}" />
<meta property="og:image" content="{{ product.featured_image | product_img_url: 'medium' }}" />
@Chrisedmo
Chrisedmo / Google-font-loader-settings.html
Created August 21, 2012 11:10
Shopify: Google font loader
<tr>
<td><label for="logo_font">Logo Font</label></td>
<td>
<select name="logo_font" id="logo_font">
<optgroup label="Sans-serif">
<option value="'Helvetica Neue', Helvetica, Arial, sans-serif" selected="selected">Helvetica/Arial</option>
<option value="Impact, Charcoal, Helvetica, Arial, sans-serif">Impact</option>
<option value="'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Lucida, Helvetica, Arial, sans-serif">Lucida Grande</option>
<option value="Trebuchet MS, sans-serif">Trebuchet MS</option>
<option value="Verdana, Helvetica, Arial, sans-serif">Verdana</option>
@Chrisedmo
Chrisedmo / index.html
Created August 14, 2012 23:56
Simple fluid Grids
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- IF PEN IS PRIVATE -->
<!-- <meta name="robots" content="noindex"> -->
<!-- END -->
@Chrisedmo
Chrisedmo / shopify-variables.less
Created July 31, 2012 13:21
Shopify: LESS Variables for themes.
// COLOURS
@brand-colour: ~"{{ settings.brand_colour }}";
@text-colour: ~"{{ settings.text_colour }}";
@logo-colour: ~"{{ settings.logo_colour }}";
@link-colour: ~"{{ settings.links_colour }}";
@active-colour: ~"{{ settings.active_colour }}";
@Chrisedmo
Chrisedmo / product-grid.liquid
Created July 31, 2012 11:45
Shopify: Product Grid Item
<div class="grid-product {% cycle ' alpha', '', ' omega' %}" itemscope itemtype="http://schema.org/Product">
{% if product.compare_at_price_min > 0 %}
<!-- SALE BOX -->
<div class="sale-box">
<p>Sale</p>
</div>
{%endif%}
<div class="product-photo">
<a href="{{ product.url | within: collection }}" title="{{ product.title }}">
@Chrisedmo
Chrisedmo / tags.liquid
Created July 31, 2012 11:38
Shopify: Tags
<ul>
<li{% unless current_tags %} class="active"{% endunless %}>
{% if collection.handle %}
<a href="/collections/{{ collection.handle }}">All</a>
{% elsif collection.products.first.type == collection.title %}
<a href="{{ collection.title | url_for_type }}">All</a>
{% elsif collection.products.first.vendor == collection.title %}
<a href="{{ collection.title | url_for_vendor }}">All</a>
{% endif %}
@Chrisedmo
Chrisedmo / sort-collection.css
Created July 31, 2012 11:35
Shopify: Client-side sorting for collections
.reorder-drop-down {
margin-top:10px;
padding:10px;
overflow:hidden
}
.reorder-drop-down label {
display:inline;
}
@Chrisedmo
Chrisedmo / latest-blog-posts.css
Created July 31, 2012 11:29
Shopify: Latest Blog Posts
.widget .latest-blog-posts-list {
margin: 0;
list-style: none;
}
.widget .latest-blog-posts-list li {
margin: 0 0 10px 0;
padding: 0 0 10px 0;
border-bottom: dotted 1px #CCC;
background: none;
word-wrap: break-word;
@Chrisedmo
Chrisedmo / shop-by-category-select.liquid
Created July 31, 2012 11:22
Shopify: Drop-down menu - select
<form name="shop-by-category">
<select onchange="if (this.value !== '') window.location = this.value;">
<option value="">Shop by Category</option>
{% for link in linklists[shop-by-category].links %}
<option name="collection" value="{{ link.url }}"{% if link.active %} selected="selected"{% endif %}>{{ link.title }}</option>
{% endfor %}
</select>
</form>