Skip to content

Instantly share code, notes, and snippets.

@rdallaire
rdallaire / Before end body
Created October 6, 2012 00:12
Common liquid snippets
These snippets are to included right before the </body> tag:
- Mouse-Chaser Reference ––
{{ site.mouse_chaser }}
- High-Slide Reference ––
<div id="highslide-container"></div>
<div id="controlbar" class="highslide-overlay controlbar">
<a href="javascript:void(0)" onclick="return hs.previous(this)" title="Previous (left arrow key)"></a>
<a href="javascript:void(0)" onclick="return hs.next(this)" title="Next (right arrow key)"></a>
<a href="javascript:void(0)" class="highslide-move" title="Click and drag to move" style="margin-left: 10px"></a>
@rdallaire
rdallaire / CC Starter CSS
Created October 16, 2012 22:01
starter CSS file
@charset "utf-8";
/*
Author CrystalCommerce.com // Ross Dallaire
Colors
*/
/* RESET */
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
{% tagged_with '.devtest' do products limit:10 %}
{% if products.size > 0 %}
<!-- if products ARE tagged -->
{% for product in products %}
{% endfor %}
{% else %}
<!-- if NO products are tagged -->
@rdallaire
rdallaire / fbcomments
Created October 23, 2012 22:22
Facebook Comments on WordPress
<!--
This can go in the comments template or in the single post template where you want the comments to appear
-->
<?php if (comments_open()) { ?><!-- check to see if comments are allow on post -->
<h3 class="comment-count" id="respond">
<!-- Shows amount of comments above -->
<div class="fb-comments-count" data-href="<?php the_permalink(); ?>">0</div> Comments
</h3>
<div id="fb-comment-box">
@rdallaire
rdallaire / page.liquid
Created November 1, 2012 16:37
CC - Add contact form to About_us
{% unless page.title == "Homepage" %}
<h1 class="pagetitle">{{ page.title }}</h1>
{% endunless %}
{{ page.content }}
{% if site.pagename == "about_us"%}
<h1>Contact Us</h1>
{% if contact_us.success? %}
@rdallaire
rdallaire / gist:3995329
Created November 1, 2012 17:46
Viewport fix
<meta name="viewport" content="width=1100" />
@rdallaire
rdallaire / social sprite links
Created November 15, 2012 16:38
Social Media Sprite Links
@rdallaire
rdallaire / page.liquid
Created December 6, 2012 18:48
Contact Form On Other Pages
{% unless page.title == "Homepage" %}
<h1 class="pagetitle">{{ page.title }}</h1>
<div id="addthis">
<!-- AddThis Button BEGIN -->
<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=300&amp;pubid=ra-50b76d820adc7f5e"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a>
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-50b76d820adc7f5e"></script>
<!-- AddThis Button END -->
</div>
{% endunless %}
@rdallaire
rdallaire / quickcart1
Created December 11, 2012 18:57
Quick Cart Drop with jquery On
$('#top-info').on('click', '#cart-preview', function() {
if ($('#cart').hasClass('activated')) {
$('#cart').stop().removeClass('activated').slideUp('fast');
} else {
$('#cart').stop().addClass('activated').slideDown('fast');
}
});
@rdallaire
rdallaire / gist:4341962
Created December 20, 2012 00:17
Quick Cart Drop Down Fixed
// Quick Cart
// TOGGLE CART TRAY FUNCTIONALITY
$('#top-info').on('click', '#cart-preview', function() {
if ($('#cart').hasClass('activated')) {
$('#cart').stop().removeClass('activated').slideUp('fast');
} else {
$('#cart').stop().addClass('activated').slideDown('fast');
}
});