short body for small screens

This commit is contained in:
Kyle Spearrin 2017-08-23 09:57:04 -04:00
parent 220703a9d7
commit 26f75845bc
3 changed files with 11 additions and 3 deletions

View File

@ -1,11 +1,13 @@
angular angular
.module('bit.global') .module('bit.global')
.controller('mainController', function ($scope, $state, authService, toastr, i18nService, $analytics, utilsService) { .controller('mainController', function ($scope, $state, authService, toastr, i18nService, $analytics, utilsService,
$window) {
var self = this; var self = this;
self.currentYear = new Date().getFullYear(); self.currentYear = new Date().getFullYear();
self.animation = ''; self.animation = '';
self.lgBody = !utilsService.isFirefox(); self.shBody = $window.screen.availHeight < 600;
self.lgBody = !utilsService.isFirefox() && !self.shBody;
$scope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) { $scope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) {
if (toParams.animation) { if (toParams.animation) {

View File

@ -95,7 +95,8 @@
<script src="app/lock/lockModule.js"></script> <script src="app/lock/lockModule.js"></script>
<script src="app/lock/lockController.js"></script> <script src="app/lock/lockController.js"></script>
</head> </head>
<body ng-controller="mainController as main" class="{{main.animation}}" ng-class="{lg: main.lgBody}"> <body ng-controller="mainController as main" class="{{main.animation}}"
ng-class="{lg: main.lgBody, sh: main.shBody }">
<div ui-view class="main-view"></div> <div ui-view class="main-view"></div>
</body> </body>
</html> </html>

View File

@ -23,6 +23,11 @@ body.lg {
height: 667px !important; height: 667px !important;
} }
body.sh {
width: 375px !important;
height: 500px !important;
}
.main-view { .main-view {
position: absolute; position: absolute;
width: 100%; width: 100%;