This file contains 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
<% wrap_layout :layout do %> | |
<article> | |
<h1><%= current_article.title %></h1> | |
<%= yield %> | |
</article> | |
<% end %> |
This file contains 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
window.requestAnimFrame = (function() { | |
return window.RequestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
window.oRequestAnimationFrame || | |
window.msRequestAnimationFrame || | |
function(callback) { | |
window.setTimeout(callback, 1000/60); | |
}; | |
})(); |
This file contains 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
<meta name="viewport" content=""> | |
<script> | |
var viewportmeta = document.querySelector("meta[name=viewport]"); | |
if (/iPhone/i.test(navigator.userAgent) && window.devicePixelRatio > 1) { | |
if (viewportmeta) { | |
viewportmeta.setAttribute('content', 'width=device-width'); | |
} | |
} else { | |
if (viewportmeta) { | |
viewportmeta.setAttribute('content', 'width=device-width,initial-scale=1'); |
This file contains 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
DS.SCSerializer = DS.JSONSerializer.extend({ | |
extractMany: function(loader, pre_json, type, records) { | |
var root = this.rootForType(type), | |
plural = this.pluralize(root), | |
json = {}; | |
json[plural] = pre_json; | |
this.sideload(loader, type, json, plural); | |
this.extractMeta(loader, type, json); |
This file contains 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
DS.SCAdapter = DS.RESTAdapter.extend({ | |
serializer: DS.SCSerializer, | |
ajax: function(url, type, hash) { | |
hash.url = url; | |
hash.type = type; | |
hash.dataType = 'json'; | |
hash.contentType = 'application/json; charset=utf-8'; | |
hash.context = this; |
This file contains 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
/* | |
** Client side - /public/src/app.js | |
*/ | |
var myApp = { | |
// Collections | |
Collections: { | |
list: Backbone.Collection.extend() | |
}, | |
// Views |
This file contains 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 link($color, $color-hover) { | |
color: $color; | |
@include responsive($large) { | |
&:hover, | |
&:focus { | |
color: $color-hover; | |
} | |
} | |
} |
This file contains 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 over { | |
html.no-touch & { | |
&:hover, | |
&:focus { | |
@content; | |
} | |
} | |
html.touch & { | |
&:active { | |
@content; |
This file contains 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
/* | |
* Easing Equations ported to CSS by @matthewlein - http://matthewlein.com/ceaser/ | |
* Converted to SCSS vars by @pettpett | |
* | |
* sample usage: | |
* a { | |
* color: #ff0000; | |
* transition: color 0.5s $easeOutQuint; | |
* &:hover, |
OlderNewer