Last active
August 29, 2015 14:25
-
-
Save jayjayjpg/6c172295ea8584a56b76 to your computer and use it in GitHub Desktop.
Ghosttyper in Ember
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.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
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
export default Ember.Controller.extend({ | |
init: function(){ | |
this._super(); | |
var code = this.get('model.cnt',0); | |
Ember.run.later(code.chooseLetter, 500); | |
}, | |
code: Ember.computed.alias('model.cnt',0), | |
growingCode: '', | |
chooseLetter: function(){ | |
this.set('growingCode', this.substring(0,3)); | |
} | |
}); |
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'; | |
var Router = Ember.Router.extend({ | |
location: 'none' | |
}); | |
Router.map(function() { | |
this.route('foo', {path: '/'}); | |
}); | |
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
export default Ember.Route.extend({ | |
model:function() { | |
return [{ | |
id: 1, | |
name: 'texttemplate', | |
cnt: 'Who are you?' | |
}]; | |
} | |
}); |
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
export default Ember.Route.extend({ | |
model: return | |
{id: 1, | |
name: 'texttemplate', | |
content: 'Who are you?' | |
} | |
}); |
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
body { | |
color: #00ff66; | |
background-color: #222; | |
font-family: monospace, Arial, sans-serif; | |
font-weight: bold; | |
font-size: 18px; | |
} | |
p{ | |
-webkit-transition: all 2s ease-out; | |
-moz-tranistion: all 2s ease-out; | |
-o-transition: all 2s ease-out; | |
transition: all 2s ease-out; | |
} | |
@keyframes blink{ | |
0%{opacity: 0;} | |
30%{opacity: 1;} | |
} | |
.cursor{ | |
-webkit-animation: blink .9s ease-out 0s infinite normal | |
-moz-animation: blink .9s ease-out 0s infinite normal | |
-o-animation: blink .9s ease-out 0s infinite normal; | |
animation: blink .9s ease-out 0s infinite normal; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment