This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$('iframe[src*="youtube.com/embed"]').wrap('<div class="video-wrapper"></div>'); | |
$('iframe[src*="player.vimeo"]').wrap('<div class="video-wrapper"></div>'); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% assign return = false %} | |
{% assign variable = your_variable %} | |
{% assign variable-to-string = variable | strip %} | |
{% assign variable-to-integer = variable | plus: 0 %} | |
{% if variable-to-string == variable %} | |
{% assign return = "string" %} | |
{% elsif variable-to-integer == variable %} | |
{% assign return = "integer" %} | |
{% else %} | |
{% assign return = "undefined" %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.thumb img').click(function(){ | |
$('img#featured').attr('src',$(this).attr('src').replace('compact','1024x1024')); | |
$(this).parents('li').addClass('active').siblings('li').removeClass('active'); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
Use: | |
{% include 'split_images_from_content' with collection.description %} | |
<div class="header">{{ split_images }}</div> | |
<div class="description">{{ split_content }}</div> | |
{% endcomment %} | |
{% assign num_to_split = 1 %} | |
{% assign split_content = split_images_from_content %} | |
{% assign split_images = '' %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% assign order = settings.order %}{% comment %}e.g. in desired case '3,1,2'{% endcomment %} | |
{% capture slides %}{{ order | split:',' }}{% endcapture %} | |
{% for i in (1..3) %}{% comment %}... rest of code?{% endcomment %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var f_page = "wvumountaineers"; // the page name for your fan page, e.g. the 'wvumountaineers' part of http://facebook.com/wvumountaineers | |
var t_page = "westvirginiau"; // the account name for your main twitter account | |
function add_commas(number) { | |
if (number.length > 3) { | |
var mod = number.length % 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for transaction in order.transactions %} | |
{% if transaction.gateway == 'gift_card' %} | |
# cannot assign anything so this is where you do it | |
{% endif %} | |
{% endfor %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media screen and (-webkit-min-device-pixel-ratio:0) { | |
/* address inconsistencies here */ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- immediately after opening <body> --> | |
<script type="text/javascript">document.body.className+=' hidden'</script> | |
<!-- before closing <body> immediately after jQuery --> | |
<script type="text/javascript"> | |
$(window).load(function() { | |
$('body').removeClass('hidden'); | |
}); | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if template contains 'collection' and collection.all_tags.size > 1 %} | |
<!-- A recursive loop to catch and filter out the different tag categories --> | |
{% assign c = 0 %} | |
{% for t in collection.all_tags %} | |
{% capture cat %}{{ cat }}{% capture temp_cat %}{% if t contains '_' %}{% assign cat_grp = t | split: '_' %}{{ cat_grp.first }}{% endif %}{% endcapture %}{% unless cat contains temp_cat %}{% if t contains '_' %}{% assign new_cat_grp = t | split: '_' %}{{ new_cat_grp.first }}{% endif %}{% unless forloop.last %}+{% endunless %}{% assign c = c | plus: 1 %}{% endunless %}{% endcapture %} | |
{% endfor %} | |
<!-- create array of tag categories --> | |
{% assign cat_array = cat | split: '+' %} |