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
/** | |
* This variable gets added to "window" and becomes | |
* the global namespace for your site. | |
* | |
* @namespace Site | |
* @global | |
*/ | |
var Site = {}; |
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
/** | |
* Creates a grid with static gutters. | |
* | |
* @mixin grid--static-gutter | |
* @param {Number} columns The number of columns in your grid. | |
* @param {Number} gutter Gutters, set in pixels regardless of any unit passed. | |
*/ | |
.grid--static-gutter(@columns: 2, @gutter) { | |
@width: 100 / @columns; | |
@marginRight: @gutter * (@columns - 1) / @columns; |
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 all images. | |
var allImages = document.querySelectorAll('img[data-src]'); | |
for (var i = 0; i < allImages.length; i++) { | |
ImageLoader.load(allImages[i]); | |
} | |
// For a single image. |
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
(function () { | |
var css = '.disable-hover, .disable-hover * { pointer-events: none !important; }', | |
head = document.head || document.getElementsByTagName('head')[0], | |
style = document.createElement('style'), | |
body = document.body, | |
timer; | |
style.type = 'text/css'; | |
if (style.styleSheet){ | |
style.styleSheet.cssText = css; |
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
YUI().use('node', 'anim', function (Y) { | |
Y.on('domready', function () { | |
(function () { | |
Y.one('body').delegate('click', function (e) { | |
e.preventDefault(); | |
var anchor = e.currentTarget.getAttribute('href'); | |
var scrollAnim = new Y.Anim({ | |
node: Y.one(Y.UA.gecko || Y.UA.ie || !!navigator.userAgent.match(/Trident.*rv.11\./) ? 'html' : 'body'), | |
to: { | |
scrollTop : Y.one(anchor).getY() |
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
<squarespace:query collection="{collection.urlId}" category="{collection.categories}" tag="{collection.tags}" limit="3"> | |
{.section items} | |
<section class="f-featured-posts"> | |
<h3>Featured Posts</h3> | |
<ul class="f-featured-list"> | |
{.repeated section @} | |
<li class="f-featured-item">{title}</li> | |
{.end} | |
</ul> |
NewerOlder