mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 08:20:13 +01:00
blur theme is now default
This commit is contained in:
parent
097257b5d7
commit
e7595af72c
12 changed files with 44 additions and 9 deletions
|
|
@ -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",
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,6 @@ export class ChartistJsService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public getAll() {
|
public getAll() {
|
||||||
console.log(this._data);
|
|
||||||
return this._data;
|
return this._data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 = () => {
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,3 @@
|
||||||
export * from './theme.constants'
|
export * from './theme.constants'
|
||||||
export * from './theme.configProvider'
|
export * from './theme.configProvider'
|
||||||
|
export * from './theme.config'
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
@import 'mixins';
|
@import 'mixins';
|
||||||
@import 'colorSchemes/mint';
|
@import 'colorSchemes/blur';
|
||||||
@import 'variables';
|
@import 'variables';
|
||||||
|
|
|
||||||
22
src/app/theme/theme.config.ts
Normal file
22
src/app/theme/theme.config.ts
Normal 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',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="badmin-transparent">
|
<body class="blur-theme">
|
||||||
|
|
||||||
<app>
|
<app>
|
||||||
<div id="preloader">
|
<div id="preloader">
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue