blur theme is now default

This commit is contained in:
nixa 2016-05-17 13:34:52 +03:00
parent 097257b5d7
commit e7595af72c
12 changed files with 44 additions and 9 deletions

View file

@ -27,6 +27,7 @@
"google-maps": "^3.2.1", "google-maps": "^3.2.1",
"jquery": "^2.2.3", "jquery": "^2.2.3",
"leaflet-map": "^0.2.1", "leaflet-map": "^0.2.1",
"lodash": "^4.12.0",
"ng2-bootstrap": "^1.0.16", "ng2-bootstrap": "^1.0.16",
"ng2-charts": "^1.0.3", "ng2-charts": "^1.0.3",
"normalize.css": "^4.1.1", "normalize.css": "^4.1.1",

View file

@ -3,7 +3,7 @@ import {RouteConfig} from '@angular/router-deprecated';
import {Pages} from './pages'; import {Pages} from './pages';
import {AppState} from './app.state'; import {AppState} from './app.state';
import {BaThemeConfigProvider} from './theme'; import {BaThemeConfigProvider, BaThemeConfig} from './theme';
import './app.loader.ts'; import './app.loader.ts';
/* /*
@ -13,7 +13,7 @@ import './app.loader.ts';
@Component({ @Component({
selector: 'app', selector: 'app',
pipes: [], pipes: [],
providers: [BaThemeConfigProvider], providers: [BaThemeConfigProvider, BaThemeConfig],
encapsulation: ViewEncapsulation.None, encapsulation: ViewEncapsulation.None,
styles: [require('normalize.css'), require('./app.scss')], styles: [require('normalize.css'), require('./app.scss')],
template: ` template: `
@ -34,7 +34,7 @@ export class App {
isMenuCollapsed:boolean = false; isMenuCollapsed:boolean = false;
constructor(private _state:AppState) { constructor(private _state:AppState, private _baThemeConfig:BaThemeConfig) {
this._state.subscribe('menu.isCollapsed', (isCollapsed) => { this._state.subscribe('menu.isCollapsed', (isCollapsed) => {
this.isMenuCollapsed = isCollapsed; this.isMenuCollapsed = isCollapsed;

View file

@ -174,7 +174,6 @@ export class ChartistJsService {
} }
public getAll() { public getAll() {
console.log(this._data);
return this._data; return this._data;
} }

View file

@ -43,8 +43,7 @@ export class BaCardBlurHelper {
private _genImageLoadSubject():void { private _genImageLoadSubject():void {
this.imageLoadSubject = new Subject<void>(); this.imageLoadSubject = new Subject<void>();
this.image.onerror = () => { this.image.onerror = (err) => {
this.imageLoadSubject.error();
this.imageLoadSubject.complete(); this.imageLoadSubject.complete();
}; };
this.image.onload = () => { this.image.onload = () => {

View file

@ -1,2 +1,3 @@
export * from './theme.constants' export * from './theme.constants'
export * from './theme.configProvider' export * from './theme.configProvider'
export * from './theme.config'

View file

@ -45,6 +45,10 @@ $card-header-font-size: 16px;
background: url($blurredBgUrl); background: url($blurredBgUrl);
transition: none; transition: none;
background-attachment: fixed; background-attachment: fixed;
.card-header, .card-footer {
background: transparent;
}
} }
.card { .card {

View file

@ -1,3 +1,3 @@
@import 'mixins'; @import 'mixins';
@import 'colorSchemes/mint'; @import 'colorSchemes/blur';
@import 'variables'; @import 'variables';

View file

@ -0,0 +1,22 @@
import {Injectable} from '@angular/core';
import {BaThemeConfigProvider} from './theme.configProvider';
@Injectable()
export class BaThemeConfig {
constructor(private _baConfig:BaThemeConfigProvider) {
this._config();
}
private _config() {
this._baConfig.changeTheme({blur: true});
this._baConfig.changeColors({
default: 'rgba(#000000, 0.2)',
defaultText: '#ffffff',
dashboard: {
white: '#ffffff',
},
});
}
}

View file

@ -70,4 +70,12 @@ export class BaThemeConfigProvider {
get() { get() {
return this.conf; return this.conf;
} }
changeTheme (theme) {
_.merge(this.get().theme, theme);
}
changeColors (colors) {
_.merge(this.get().colors, colors);
}
} }

View file

@ -19,7 +19,7 @@
</head> </head>
<body class="badmin-transparent"> <body class="blur-theme">
<app> <app>
<div id="preloader"> <div id="preloader">

View file

@ -19,7 +19,7 @@ import 'rxjs/add/operator/mergeMap';
import 'jquery'; import 'jquery';
import 'bootstrap-loader'; import 'bootstrap-loader';
import 'font-awesome-sass-loader'; import 'font-awesome-sass-loader';
import 'lodash';
if ('production' === ENV) { if ('production' === ENV) {
// Production // Production

View file

@ -6,6 +6,7 @@
"ambientDependencies": { "ambientDependencies": {
"core-js": "registry:dt/core-js#0.0.0+20160317120654", "core-js": "registry:dt/core-js#0.0.0+20160317120654",
"hammerjs": "github:DefinitelyTyped/DefinitelyTyped/hammerjs/hammerjs.d.ts#74a4dfc1bc2dfadec47b8aae953b28546cb9c6b7", "hammerjs": "github:DefinitelyTyped/DefinitelyTyped/hammerjs/hammerjs.d.ts#74a4dfc1bc2dfadec47b8aae953b28546cb9c6b7",
"lodash": "registry:dt/lodash#3.10.0+20160330154726",
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#8cf8164641be73e8f1e652c2a5b967c7210b6729", "node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#8cf8164641be73e8f1e652c2a5b967c7210b6729",
"webpack": "github:DefinitelyTyped/DefinitelyTyped/webpack/webpack.d.ts#95c02169ba8fa58ac1092422efbd2e3174a206f4" "webpack": "github:DefinitelyTyped/DefinitelyTyped/webpack/webpack.d.ts#95c02169ba8fa58ac1092422efbd2e3174a206f4"
} }