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
var renderTemplate = function(context, source, data, callback) { | |
$.get(source, function(template){ | |
$(context).html($.mustache(template, data)); | |
if (typeof callback === "function") | |
callback.call(this, context); | |
}); | |
}; |
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
var percentBetween = function(n1, n2, pos) { | |
return Math.floor(pos * n2) + n1; | |
}; |
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
$grid-max: 12; | |
$grid-column: 80px; | |
$grid-gutter: 0px; | |
@function gridw ($span: $grid-max, $offset: 0px) { | |
@return ($grid-column * $span) + ($grid-gutter * ($span - 1)) + $offset; | |
} | |
@mixin grid ($span: $grid-max, $offset: 0px) { | |
width: gridw($span, $offset); |
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
@mixin animation($animate...) { | |
$max: length($animate); | |
$animations: ''; | |
@for $i from 1 through $max { | |
$animations: #{$animations + nth($animate, $i)}; | |
@if $i < $max { | |
$animations: #{$animations + ", "}; | |
} |
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
.slice { | |
display: table; | |
table-layout: fixed; // makes items equal sizes automatically | |
width: 100%; | |
} | |
.slice-auto { | |
table-layout: auto; // items will resize based on content size | |
} |
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
Backbone.JsonpCollection = Backbone.Collection.extend({ | |
sync: function(method, model, options) { | |
var params = _.extend({ | |
type: 'GET', | |
url: this.url, | |
dataType: "jsonp", | |
processData: false | |
}, options); | |
return $.ajax(params); |
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
.icon { | |
display: inline-block; | |
background-size: contain; | |
font-size: 0; | |
color: transparent; | |
} | |
.icon-block { | |
display: block; |
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
_.mixin({ | |
bindDelay: function(func, context, wait) { | |
return _.delay(_.bind(func, context || this), wait, _.last(arguments, 3)); | |
}, | |
bindDefer: function(func, context) { | |
return _.defer(_.bind(func, context || this), _.last(arguments, 2)); | |
}, | |
repeat: function(func, interval) { |
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
@mixin respond($min: -1, $max: -1, $media: "all") { | |
$query: "only " + $media; | |
@if $min != -1 and $max != -1 { | |
$query: "only " + $media + " and (min-width: " + $min + ") and (max-width: " + ($max - 1) + ")"; | |
} @else if $min == -1 and $max != -1 { | |
$query: "only " + $media + " and (max-width: " + ($max - 1) + ")"; | |
} @else if $min != -1 and $max == -1 { | |
$query: "only " + $media + " and (min-width: " + $min + ")"; | |
} |
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
$grid-max: 12; | |
$grid-column: 80px; | |
$grid-gutter: 0; | |
@function gridw ($span: $grid-max, $offset: 0) { | |
@if $span != -1 { | |
@return ($grid-column * $span) + ($grid-gutter * ($span - 1)) + $offset; | |
} | |
@return -1; |
OlderNewer