Skip to content
Permalink
Browse files

Conditional loading of bootstrap and mobile css

fixes #197
  • Loading branch information...
raitisbe committed Jun 8, 2019
1 parent d7ed51c commit e1b31195b0a060db8e0f1e89da1c13db5fbb1a3e
Showing with 13 additions and 13 deletions.
  1. +12 −3 components/layout/layout.js
  2. +1 −10 components/layout/partials/layout.html
@@ -2,16 +2,13 @@
* @namespace hs.layout
* @memberOf hs
*/
import bootstrapCss from 'bootstrap/dist/css/bootstrap.css';
//import bootstrapIsolatedCss from 'bootstrap/dist/css/bootstrap.isolated.css';
import 'ol/ol.css';
import angular from 'angular';
import core from 'core';
import map from 'map';
import geolocation from 'geolocation';
import layermanager from 'layermanager';
import appCss from 'css/app.css';
import whhgCss from 'css/whhg-font/css/whhg.css';

// 'material.components.bottomSheetCollapsible'
angular.module('hs.layout', ['hs.core', 'hs.map', 'hs.geolocation', 'hs.layermanager', 'hs.print'])
@@ -54,6 +51,18 @@ angular.module('hs.layout', ['hs.core', 'hs.map', 'hs.geolocation', 'hs.layerman
}, 100);
}
}

if(config.importCss){
if(config.useIsolatedBootstrap){
require('bootstrap/dist/css/bootstrap.isolated.css')
} else {
require('bootstrap/dist/css/bootstrap.css')
}
if(!!window.cordova){
require('css/mobile.css')
}
require ('css/whhg-font/css/whhg.css')
}
}
};
}
@@ -1,13 +1,4 @@
<!--<link rel="stylesheet" ng-if="importCss && !useIsolatedBootstrap" ng-href="node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" ng-if="importCss && useIsolatedBootstrap" ng-href="node_modules/bootstrap/dist/css/bootstrap.isolated.css">
<link rel="stylesheet" ng-if="importCss" ng-href="node_modules/openlayers/css/ol.css" type="text/css">
-->
<!-- Compiled and minified CSS -->
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.99.0/css/materialize.min.css"> -->
<link rel="stylesheet" type="text/css" ng-href="css/mobile.css" ng-if="importCss && !!window.cordova">
<!--<link rel="stylesheet" ng-if="importCss" ng-href="css/app.css"/>
<link rel="stylesheet" ng-if="importCss" ng-href="css/whhg-font/css/whhg.css"/>
-->

<div id="page-wrapper" class="bootstrap-iso">
<div id="content-wrapper" ng-class="{'open': Core.sidebarExpanded, 'sb-right': Core.sidebarRight && !Core.puremapApp, 'sb-left': !Core.sidebarRight && !Core.puremapApp, 'classic-sidebar': Core.classicSidebar, 'mini-sidebar': !Core.classicSidebar}">
<div class="page-content">

0 comments on commit e1b3119

Please sign in to comment.
You can’t perform that action at this time.