Last active
January 17, 2017 22:44
-
-
Save iezer/c2f209ba0c9242b5c11220a0662bc333 to your computer and use it in GitHub Desktop.
Liquid Fire App - Ember Elsewhere Animated
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 Ember from 'ember'; | |
let duration = 400; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
animationRules: animationRules | |
}); | |
function animationRules() { | |
this.transition( | |
this.toValue(true), | |
this.useAndReverse('fade', { duration }) | |
); | |
} |
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 Ember from 'ember'; | |
import config from './config/environment'; | |
const Router = Ember.Router.extend({ | |
location: 'none', | |
rootURL: config.rootURL | |
}); | |
Router.map(function() { | |
this.route('item', { path: '/:id' }); | |
}); | |
export default Router; |
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 Ember from 'ember'; | |
export default Ember.Route.extend({ | |
model() { | |
let result = []; | |
for (let i = 1; i<= 10; i++) { | |
result.push({ | |
id: i, | |
name: `Product #${i}` | |
}); | |
} | |
return result; | |
} | |
}); |
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
.header, .footer { | |
position: fixed; | |
height: 75px; | |
width: 100%; | |
background: orange; | |
left: 0px; | |
} | |
.header { top: 0px; } | |
.footer { bottom: 0px; } | |
.application__body { | |
position: fixed; | |
width: 100%; | |
top: 75px; | |
bottom: 75px; | |
} | |
.item { | |
border: 1px solid black; | |
margin: 5px; | |
} | |
.index__scroll-container { | |
height: 100%; | |
overflow-y: scroll; | |
/* Required for momentum scrolling in iOS Safari. | |
also overflow-y has to be 'scroll' and not 'auto' | |
*/ | |
-webkit-overflow-scrolling: touch; | |
} | |
.item.focused { | |
border: 1px solid red; | |
margin: 5px; | |
} |
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
{ | |
"version": "0.10.7", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.4.5", | |
"ember-template-compiler": "2.4.5", | |
"ember-testing": "2.4.5" | |
}, | |
"addons": { | |
"liquid-fire": "0.24.0", | |
"ember-elsewhere": "0.4.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment