Forked from aaronmw/components.bubble-banner.js
Last active
November 30, 2017 18:48
-
-
Save k-fish/e25a8b0d5fa072ec5ae4eff87011ed0f to your computer and use it in GitHub Desktop.
Bubble Example
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'; | |
export function bubbleClasses([{ color, size }]/*, hash*/) { | |
return Ember.String.htmlSafe(`backgroundColor--${color} bubble--size--${size}`); | |
} | |
export default Ember.Helper.helper(bubbleClasses); |
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 function bubbleStyle([{ top, left, duration }],/*, hash*/) { | |
return Ember.String.htmlSafe(`transform: translate3d(${left}px,${top}px, 0px); transition-duration: ${duration}s`); | |
} | |
export default Ember.Helper.helper(bubbleStyle); |
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 { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
.backgroundColor--red { | |
background: #FA405C; | |
} | |
.backgroundColor--green { | |
background: #85C525; | |
} | |
.backgroundColor--blue { | |
background: #062942; | |
} | |
.backgroundColor--yellow { | |
background: #EDC02B; | |
} | |
.banner { | |
border-radius: 5px; | |
overflow: hidden; | |
background: #0d83dd; | |
padding: 100px; | |
color: white; | |
position: relative; | |
-webkit-transform: translate3d(0, 0, 0); | |
} | |
.bubble { | |
border-radius: 1000px; | |
position: absolute; | |
transition-property: transform; | |
transition-duration: 3s; | |
transition-timing-function: ease-in-out; | |
z-index: -1; | |
} | |
:root { | |
--bubble--size--small: 50px; | |
--bubble--blur--small: 50px; | |
--bubble--opacity--small: 0.5; | |
--bubble--size--medium: 100px; | |
--bubble--blur--medium: 25px; | |
--bubble--opacity--medium: 0.75; | |
--bubble--size--large: 150px; | |
--bubble--blur--large: 5px; | |
--bubble--opacity--large: 1; | |
} | |
.bubble--size--small { | |
width: var(--bubble--size--small); | |
height: var(--bubble--size--small); | |
//filter: blur(var(--bubble--blur--small)); | |
opacity: var(--bubble--opacity--small); | |
} | |
.bubble--size--medium { | |
width: var(--bubble--size--medium); | |
height: var(--bubble--size--medium); | |
//filter: blur(var(--bubble--blur--medium)); | |
opacity: var(--bubble--opacity--medium); | |
} | |
.bubble--size--large { | |
width: var(--bubble--size--large); | |
height: var(--bubble--size--large); | |
//filter: blur(var(--bubble--blur--large)); | |
opacity: var(--bubble--opacity--large); | |
} |
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": { | |
"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.12.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment