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
App.Post.reopenClass({ | |
find: function(id) { | |
return Ember.$.getJSON('/posts/' + id).then(function(data) { | |
return App.Post.create(data); | |
}); | |
}, | |
findAll: function() { | |
return Ember.$.getJSON('/posts').then(function(data) { | |
var items = Ember.A(); | |
data.nodes.forEach(function(data) { |
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
Ember.Handlebars.helper('filesize', function(value) { | |
if (typeof value === 'undefined') { | |
return null; | |
} | |
var i, | |
filesize, | |
units = ['B', 'KB', 'MB', 'GB', 'TB']; | |
for (i = 0; i < units.length; i++) { | |
if (value < 1024) { | |
filesize = Math.floor(value) + units[i]; |
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
import Test from '../models/test'; | |
var testRoute = Ember.Route.extend({ | |
model: function(params) { | |
return Test.create({title: 'foo'}); | |
} | |
}); | |
export default testRoute; |
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($mobile-touch-class:false) { | |
html.no-touch & { | |
&:hover, | |
&:focus { | |
@content; | |
} | |
} | |
html.touch & { | |
@if $mobile-touch-class { | |
&.#{$mobile-touch-class} { |
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
%headerPrimary { | |
font-size: 48px; | |
font-weight: 200; | |
line-height: 1; | |
margin-bottom: 0.25em; | |
@include responsive('lap') { | |
font-size: 60px; | |
} | |
@include responsive('desk') { | |
font-size: 70px; |
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
// ---- | |
// Sass (v3.3.5) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
@mixin responsive($bp) { | |
@if $bp == 'small' { | |
@media only screen and (min-width: 24em) { | |
@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
// ---- | |
// Sass (v3.3.7) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
@mixin e($name) { | |
@at-root &__#{$name} { | |
@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
// ---- | |
// Sass (v3.3.7) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
.block { | |
color: red; | |
&__element { | |
color: green; | |
&--modifier { |
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
// ---- | |
// Sass (v3.3.7) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
.block { | |
color: red; | |
&__element { | |
color: green; | |
&--modifier { |