mirror of https://github.com/akveo/blur-admin
parent
db01a0be11
commit
dee1333e06
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
Loading…
Reference in new issue