forked from akveo/blur-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(layout): fix switching to blur theme
- Loading branch information
1 parent
db01a0b
commit dee1333
Showing
7 changed files
with
43 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* Created by k.danovsky on 12.05.2016. | ||
*/ | ||
|
||
(function () { | ||
'use strict'; | ||
|
||
angular.module('BlurAdmin.theme') | ||
.service('themeLayoutSettings', themeLayoutSettings); | ||
|
||
/** @ngInject */ | ||
function themeLayoutSettings(layoutTheme) { | ||
var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|windows phone/).test(navigator.userAgent.toLowerCase()); | ||
var mobileClass = isMobile ? 'mobile' : ''; | ||
var blurClass = layoutTheme.blur ? 'blur-theme' : ''; | ||
angular.element(document.body).addClass(mobileClass).addClass(blurClass); | ||
|
||
return { | ||
blur: layoutTheme.blur, | ||
mobile: isMobile, | ||
} | ||
} | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters