Last active
March 27, 2019 01:00
-
-
Save golampo/0333a864a2067eb1dbb9faeb09956e33 to your computer and use it in GitHub Desktop.
Entity Card - v3
This file contains hidden or 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({ | |
}); |
This file contains hidden or 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({ | |
}); |
This file contains hidden or 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({ | |
}); |
This file contains hidden or 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({ | |
}); |
This file contains hidden or 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({ | |
entityLabels: { | |
course: 'COURSE', | |
video: 'VIDEO', | |
learningPath: 'LEARNING PATH' | |
} | |
}); |
This file contains hidden or 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({ | |
}); |
This file contains hidden or 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: ['detail-card'], | |
entity: undefined, | |
}); |
This file contains hidden or 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 { actionTypes } from './cards/actions-menu'; | |
export default Ember.Component.extend({ | |
primaryActions: [actionTypes.bookmark, actionTypes.share], | |
secondaryActions: [actionTypes.markAsDone], | |
actions: { | |
didBookmark() {}, | |
didShare() {}, | |
didMarkAsDone() {}, | |
} | |
}); |
This file contains hidden or 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({ | |
entities: [ | |
{ | |
title: 'Decision-Making Strategies', | |
contentType: 'course', | |
actions: ['BOOKMARK', 'SHARE'], | |
authors: [{ name: 'Todd Rodgers' }], | |
duration: '45m', | |
}, | |
{ | |
title: 'HTML resources', | |
contentType: 'video', | |
actions: ['BOOKMARK', 'MARK_AS_DONE'], | |
authors: [{ name: 'Todd Rodgers' }], | |
parent: { | |
title: 'How to do the things you want' | |
}, | |
duration: '4m 30s', | |
}, | |
{ | |
title: 'Bowling for Idiots', | |
contentType: 'learningPath', | |
actions: ['SHARE', 'MARK_AS_DONE'], | |
skills: 'Bowling, Dancing', | |
}, | |
] | |
}); |
This file contains hidden or 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('entity'); | |
}); | |
export default Router; |
This file contains hidden or 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({ | |
}); |
This file contains hidden or 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 { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
.detail-card { | |
display: flex; | |
margin-bottom: 16px; | |
max-width: 400px; | |
} | |
.detail-card__title { | |
margin: 0 0; | |
font-size: 1rem; | |
} | |
.detail-card__media { | |
flex: 0 0 auto; | |
width: 100px; | |
height: 64px; | |
background-color: #ccc; | |
margin-right: 16px; | |
} | |
.detail-card__body { | |
flex: 1 1 auto; | |
display: flex; | |
flex-direction: column; | |
justify-content: space-between; | |
} | |
.detail-card__body-footer { | |
display: flex; | |
justify-content: space-between; | |
align-items: center; | |
} | |
.detail-card__meta { | |
flex: 1 1 auto; | |
} | |
.detail-card__actions { | |
flex: 0 0 auto; | |
} | |
.detail-card__label, | |
.detail-card__content, | |
.detail-card__meta { | |
font-size: .85rem; | |
} | |
.actions__more-menu { | |
list-style-type: none; | |
margin: 0; | |
} | |
.actions-menu__item { | |
margin: 0; | |
display: inline-block; | |
position: relative; | |
white-space: nowrap; | |
} | |
.actions-menu__more-menu { | |
position: absolute; | |
right: 0; | |
} | |
This file contains hidden or 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": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.12.0", | |
"ember-template-compiler": "2.12.0", | |
"ember-testing": "2.12.0" | |
}, | |
"addons": { | |
"ember-data": "2.10.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment