Styling favicon and login background
Change-Id: I4067985daa063575ac371ba39dbdbeceff3eae50
diff --git a/src/app/core/login/login.html b/src/app/core/login/login.html
index 710822a..6f23959 100644
--- a/src/app/core/login/login.html
+++ b/src/app/core/login/login.html
@@ -4,10 +4,9 @@
<!--<button type="button" ng-click="vm.login(username, password)">Login</button>-->
<!--</form>-->
<!-- Main content-->
-<section class="content">
+<section class="content" ng-style="vm.loginStyle">
<div class="container-center animated slideInDown">
-
<div class="view-header">
<div class="header-icon">
<i class="pe page-header-icon pe-7s-unlock"></i>
@@ -19,7 +18,7 @@
</small>
</div>
</div>
-
+ <hr>
<div class="panel panel-filled">
<div class="panel-body">
<form id="loginForm" ng-submit="vm.login(username, password)" novalidate>
diff --git a/src/app/core/login/login.scss b/src/app/core/login/login.scss
new file mode 100644
index 0000000..88a907a
--- /dev/null
+++ b/src/app/core/login/login.scss
@@ -0,0 +1,18 @@
+xos-login {
+ .content {
+ background-repeat: no-repeat;
+ background-size: cover;
+ }
+
+ .container-center {
+ background: rgba(68, 70, 79, 0.8);
+ }
+
+ .panel.panel-filled {
+ background: transparent;
+ }
+
+ hr {
+ border-color: #fff;
+ }
+}
diff --git a/src/app/core/login/login.ts b/src/app/core/login/login.ts
index ca500dc..11642f1 100644
--- a/src/app/core/login/login.ts
+++ b/src/app/core/login/login.ts
@@ -1,13 +1,21 @@
import {AuthService} from '../../datasources/rest/auth.rest';
+import {StyleConfig} from '../../config/style.config';
+import './login.scss';
class LoginCtrl {
static $inject = ['AuthService', '$state'];
-
+ public loginStyle: any;
+ public img: string;
/** @ngInject */
constructor(
private authService: AuthService,
private $state: angular.ui.IStateService
) {
+ this.img = this.getImg(StyleConfig.background);
+
+ this.loginStyle = {
+ 'background-image': `url('${this.getImg(StyleConfig.background)}')`
+ };
}
public login(username: string, password: string) {
@@ -21,6 +29,10 @@
})
.catch(e => console.error);
}
+
+ private getImg(img: string) {
+ return require(`../../images/brand/${img}`);
+ }
}
export const xosLogin: angular.IComponentOptions = {