2016-05-16 12:03:17 +00:00
|
|
|
---
|
2016-05-16 14:23:48 +00:00
|
|
|
title: Enabling blur theme
|
2016-05-16 12:03:17 +00:00
|
|
|
author: kd
|
2016-05-16 14:23:48 +00:00
|
|
|
sort: 850
|
2016-05-16 12:03:17 +00:00
|
|
|
group: Customization
|
|
|
|
template: article.jade
|
|
|
|
---
|
|
|
|
|
2016-05-16 14:23:48 +00:00
|
|
|
If you want to switch theme to the blur, you need to follow 3 simple steps:
|
2016-05-16 12:03:17 +00:00
|
|
|
|
2016-05-16 14:23:48 +00:00
|
|
|
1) Blur theme needs some javascript to calculate initial background offsets for panels.
|
|
|
|
That's why first thing you need to do is enable that code.
|
|
|
|
This should be done in Angular **configuration block**.
|
|
|
|
For example you can add following lines to `src/app/theme/theme.config.js`:
|
2016-05-16 12:03:17 +00:00
|
|
|
```javascript
|
|
|
|
baConfigProvider.changeTheme({blur: true});
|
2016-05-16 14:23:48 +00:00
|
|
|
```
|
2016-05-16 12:03:17 +00:00
|
|
|
|
2016-05-16 14:23:48 +00:00
|
|
|
2) As well you need to change some colors.
|
|
|
|
For example *Mint*'s default gray text color doesn't look good on blurred panels.
|
|
|
|
For our blur theme we use following configuration:
|
|
|
|
```javascript
|
2016-05-16 12:03:17 +00:00
|
|
|
baConfigProvider.changeColors({
|
|
|
|
default: 'rgba(#000000, 0.2)',
|
|
|
|
defaultText: '#ffffff',
|
|
|
|
dashboard: {
|
|
|
|
white: '#ffffff',
|
|
|
|
},
|
|
|
|
});
|
|
|
|
```
|
2016-05-16 14:23:48 +00:00
|
|
|
3) CSS should also be recompiled.
|
|
|
|
Before running build command, we suggest you to switch to *blur* color profile.
|
|
|
|
To do this replace theme in file `src/sass/theme/common.scss`:
|
2016-05-16 12:03:17 +00:00
|
|
|
|
2016-05-16 14:23:48 +00:00
|
|
|
|
2016-05-16 12:03:17 +00:00
|
|
|
```scss
|
|
|
|
@import 'theme/conf/colorScheme/mint';
|
|
|
|
```
|
2016-05-16 14:23:48 +00:00
|
|
|
|
2016-05-16 12:03:17 +00:00
|
|
|
to
|
2016-05-16 14:23:48 +00:00
|
|
|
|
2016-05-16 12:03:17 +00:00
|
|
|
```scss
|
|
|
|
@import 'theme/conf/colorScheme/blur';
|
2016-05-16 14:23:48 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
3.1) If you would like to use some different background, replace following images:
|
|
|
|
|
|
|
|
- `src/app/assets/img/blur-bg.jpg` (main background image)
|
|
|
|
- `src/app/assets/img/blur-bg-blurred.jpg` (blurred background image used on panels)
|
|
|
|
|
|
|
|
We suggest using 10px Gaussian blur to blur original image.
|
|
|
|
|
|
|
|
_________________________________________
|
|
|
|
That's it! You have successfully blurred your theme! Run `gulp serve` and check it out.
|