Last active
April 11, 2017 13:37
-
-
Save krivaten/0900bf2ad33fd031013223bba56066ea to your computer and use it in GitHub Desktop.
New 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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
classNames: [ | |
'bd(1)', | |
'bd-c(gray-l1)', | |
'p(2)', | |
'bs(1)', | |
'pos(relative)' | |
] | |
}); |
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
import Ember from 'ember'; | |
const { | |
get, | |
computed, | |
inject: { service } | |
} = Ember; | |
export function initialize() { | |
if (EmberENV.development) { | |
Ember.Component.reopen({ | |
config: service(), | |
attributeBindings: ['componentName:component-name'], | |
componentName: computed('config.showNames', function() { | |
let showNames = get(this, 'config.showNames'); | |
let name = get(this, '_debugContainerKey'); | |
return showNames ? name.split(':').pop() : undefined; | |
}) | |
}); | |
} | |
} | |
export default { | |
name: 'component-name', | |
initialize: initialize, | |
}; |
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.Service.extend({ | |
showNames: true | |
}); |
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 "https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"; | |
@import "https://cdn.rawgit.com/krivaten/elassus/master/css/elassus.min.css"; |
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.12.1", | |
"EmberENV": { | |
"development": false, | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"elassus": "https://cdn.rawgit.com/krivaten/elassus/master/css/elassus.min.css", | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.12.0", | |
"ember-template-compiler": "2.12.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment