playing with colors

This commit is contained in:
nixa 2016-05-19 11:29:41 +03:00
parent 77a33d880b
commit 9fbe408c22
12 changed files with 121 additions and 114 deletions

View file

@ -53,6 +53,6 @@ export class BaCardBlur {
}
private _isEnabled() {
return this._baConfig.get().theme.blur;
return this._baConfig.get().theme.name == 'blur';
}
}

View file

@ -7,23 +7,29 @@ import {BaThemeConfigProvider, isMobile} from '../../../theme';
})
export class BaThemeRun {
@HostBinding('class.blur-theme') isBlur:boolean = false;
@HostBinding('class.mobile') isMobile:boolean = false;
private _classes:Array<string> = [];
@HostBinding('class') classesString:string;
constructor(private _baConfig:BaThemeConfigProvider) {
}
public ngOnInit():void {
this._assignBlur();
this._assignTheme();
this._assignMobile();
}
// TODO: assign any theme class, not only hardcoded blur
private _assignBlur():void {
this.isBlur = this._baConfig.get().theme.blur;
private _assignTheme():void {
this._addClass(this._baConfig.get().theme.name);
}
private _assignMobile():void {
this.isMobile = isMobile();
if (isMobile()) {
this._addClass('mobile');
}
}
private _addClass(cls:string) {
this._classes.push(cls);
this.classesString = this._classes.join(' ');
}
}

View file

@ -26,8 +26,8 @@ $bootstrap-panel-header-border: none;
$bootstrap-panel-shadow: 1px 1px 4px 0 rgba(0, 0, 0, 0.15);
$mail-box: whitesmoke;
$auth-panel-background: #ffffff;
$progress-background: rgba(#000000, 0.07);
$progress-default: rgba(#000000, 0.15);
$progress-background: rgba(0,0,0, 0.15);
$progress-default: rgba($default-text, 0.95);
$primary: #00abff !default;
$info: #40daf1 !default;

View file

@ -31,7 +31,7 @@ export class BaThemeConfigProvider {
conf = {
theme: {
blur: false,
name: 'ng2',
},
colors: {
default: this.basic.default,
@ -64,6 +64,10 @@ export class BaThemeConfigProvider {
gossip: this.dashboardColors.gossip,
white: this.dashboardColors.white,
},
custom: {
dashboardLineChart: '#fff',
}
}
};