From c10f864c59b693a3db3ae990ee11c6357c4cd8e0 Mon Sep 17 00:00:00 2001 From: nixa <4dmitr@gmail.com> Date: Thu, 16 Jun 2016 11:33:20 +0300 Subject: [PATCH] feat(pages): login page --- src/app/app.component.ts | 6 ++ src/app/pages/login/index.ts | 1 + src/app/pages/login/login.component.ts | 18 ++++ src/app/pages/login/login.html | 39 +++++++ src/app/pages/login/login.scss | 141 +++++++++++++++++++++++++ 5 files changed, 205 insertions(+) create mode 100644 src/app/pages/login/index.ts create mode 100644 src/app/pages/login/login.component.ts create mode 100644 src/app/pages/login/login.html create mode 100644 src/app/pages/login/login.scss diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 22271f7d..2a1889d7 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -4,6 +4,7 @@ import {Component, ViewEncapsulation} from '@angular/core'; import {RouteConfig} from '@angular/router-deprecated'; import {Pages} from './pages'; +import {Login} from './pages/login'; import {AppState} from './app.state'; import {BaThemeConfigProvider, BaThemeConfig} from './theme'; import {BaThemeRun} from './theme/directives'; @@ -36,6 +37,11 @@ import {layoutPaths} from './theme/theme.constants'; component: Pages, useAsDefault: true }, + { + path: '/login', + name: 'Login', + component: Login + }, // handle any non-registered route // and simply redirects back to dashboard page // you can specify any customer 404 page while it's not built in ito ng2-admin diff --git a/src/app/pages/login/index.ts b/src/app/pages/login/index.ts new file mode 100644 index 00000000..69c16441 --- /dev/null +++ b/src/app/pages/login/index.ts @@ -0,0 +1 @@ +export * from './login.component'; diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts new file mode 100644 index 00000000..a47c295f --- /dev/null +++ b/src/app/pages/login/login.component.ts @@ -0,0 +1,18 @@ +import {Component, ViewEncapsulation} from '@angular/core'; + + +@Component({ + selector: 'login', + encapsulation: ViewEncapsulation.None, + directives: [], + styles: [require('./login.scss')], + template: require('./login.html'), +}) +export class Login { + + constructor() { + } + + ngOnInit() { + } +} diff --git a/src/app/pages/login/login.html b/src/app/pages/login/login.html new file mode 100644 index 00000000..1f7b5cc2 --- /dev/null +++ b/src/app/pages/login/login.html @@ -0,0 +1,39 @@ +
+
+

Sign in to Blur Admin

+ New to ng2-admin? Sign up! + +
+
+ + +
+ +
+
+
+ + +
+ +
+
+
+
+ + Forgot password? +
+
+
+ +
or Sign in with one click
+ + +
+
diff --git a/src/app/pages/login/login.scss b/src/app/pages/login/login.scss new file mode 100644 index 00000000..acf1045b --- /dev/null +++ b/src/app/pages/login/login.scss @@ -0,0 +1,141 @@ +@import '../../theme/sass/conf/conf'; + +main { + min-height: 520px; + height: 100%; +} + +$text-color: #ffffff; + +.form-control, .form-control:focus { + @include placeholderStyle($text-color, 0.9); + background-color: rgba(0, 0, 0, .4); + border-radius: 5px; + color: $text-color; +} +.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { + @include placeholderStyle($text-color, 0.6); +} + +.auth-main { + display: flex; + align-items: center; + height: 100%; + width: 100%; + position: relative; +} + +.auth-block { + width: 540px; + margin: 0 auto; + border-radius: 5px; + @include bg-translucent-dark(0.55); + color: #fff; + padding: 32px; + h1 { + font-weight: $font-light; + margin-bottom: 28px; + text-align: center; + } + p { + font-size: 16px; + } + a { + text-decoration: none; + outline: none; + transition: all 0.2s ease; + color: $primary; + &:hover { + color: $primary-dark; + } + } + + .control-label { + padding-top: 11px; + color: $text-color; + } + + .form-group { + margin-bottom: 12px; + } +} + +.auth-input { + width: 300px; + margin-bottom: 24px; + input { + display: block; + width: 100%; + border: none; + font-size: 16px; + padding: 4px 10px; + outline: none; + } +} + +a.forgot-pass { + display: block; + text-align: right; + margin-bottom: -20px; + float: right; + z-index: 2; + position: relative; +} + +.auth-link { + display: block; + font-size: 16px; + text-align: center; + margin-bottom: 33px; +} + +.auth-sep { + margin-top: 36px; + margin-bottom: 24px; + line-height: 20px; + font-size: 16px; + text-align: center; + display: block; + position: relative; + & > span { + display: table-cell; + width: 30%; + white-space: nowrap; + padding: 0 24px; + color: $text-color; + & > span { + margin-top: -12px; + display: block; + } + } + &:before, &:after { + border-top: solid 1px $text-color; + content: ""; + height: 1px; + width: 35%; + display: table-cell; + } +} + +.al-share-auth { + text-align: center; + .al-share { + float: none; + margin: 0; + padding: 0; + display: inline-block; + li { + margin-left: 24px; + &:first-child { + margin-left: 0; + } + i { + font-size: 24px; + } + } + } +} + +.btn-auth { + color: #ffffff!important; +}