properly display svg

This commit is contained in:
lone-cloud 2015-11-05 14:58:04 -08:00
parent 29b0c58abf
commit 391ccd53b6
3 changed files with 5 additions and 17 deletions

View file

@ -23,11 +23,9 @@ export default Em.Component.extend({
dimmerOnClass: function(){ dimmerOnClass: function(){
var dimmerOn = this.get('dimmerOn'), var dimmerOn = this.get('dimmerOn'),
storage = this.get('storage'), storage = this.get('storage');
className = null;
if(dimmerOn){ if(dimmerOn){
className = 'dimmerBulbOn';
Em.$('body').addClass('dimmerOn'); Em.$('body').addClass('dimmerOn');
Em.$('html').addClass('dimmerOn'); Em.$('html').addClass('dimmerOn');
} else { } else {
@ -36,9 +34,7 @@ export default Em.Component.extend({
} }
storage.set('huegasm.dimmerOn', dimmerOn); storage.set('huegasm.dimmerOn', dimmerOn);
}.observes('dimmerOn'),
return className;
}.property('dimmerOn'),
init(){ init(){
this._super(); this._super();

View file

@ -19,6 +19,5 @@
<footer id="footer"> <footer id="footer">
<p><span class="relative"><span id="dimmerWrapper" {{action "toggleDimmer"}}> <p><span class="relative"><span id="dimmerWrapper" {{action "toggleDimmer"}}>
<img width="40" height="40" src="assets/images/bulb.svg" class={{dimmerOnClass}}>
</span>Made by <a href="//egorphilippov.me">egorphilippov.me</a> © 2015 Huegasm</span></p> </span>Made by <a href="//egorphilippov.me">egorphilippov.me</a> © 2015 Huegasm</span></p>
</footer> </footer>

View file

@ -889,12 +889,6 @@ md-switch.md-default-theme.md-checked .md-thumb {
margin-top: 10px; margin-top: 10px;
} }
.dimmerBulbOn {
fill: gold;
stroke: gold;
stroke-width: 10px;
}
div.dimmerOn { div.dimmerOn {
color: white !important; color: white !important;
background: #171717 !important; background: #171717 !important;
@ -978,10 +972,9 @@ body.dimmerOn {
left: -50px; left: -50px;
bottom: -10px; bottom: -10px;
cursor: pointer; cursor: pointer;
svg { width: 35px;
width: 40px; height: 40px;
height: 40px; background: url(images/bulb.svg) center center no-repeat;
}
} }
.noUi-value-vertical { .noUi-value-vertical {