diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 8ba9347..76bb5cb 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -2,8 +2,9 @@ import { NgModule } from '@angular/core'; import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; const routes: Routes = [ - { path: '', redirectTo: 'onboarding', pathMatch: 'full' }, + { path: '', redirectTo: 'login', pathMatch: 'full' }, { path: 'onboarding', loadChildren: './onboarding/onboarding.module#OnboardingPageModule' }, + { path: 'login', loadChildren: './login/login.module#LoginPageModule' }, ]; @NgModule({ diff --git a/src/app/login/login.module.ts b/src/app/login/login.module.ts new file mode 100644 index 0000000..be78c38 --- /dev/null +++ b/src/app/login/login.module.ts @@ -0,0 +1,26 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { Routes, RouterModule } from '@angular/router'; + +import { IonicModule } from '@ionic/angular'; + +import { LoginPage } from './login.page'; + +const routes: Routes = [ + { + path: '', + component: LoginPage + } +]; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + RouterModule.forChild(routes) + ], + declarations: [LoginPage] +}) +export class LoginPageModule {} diff --git a/src/app/login/login.page.html b/src/app/login/login.page.html new file mode 100644 index 0000000..2bac730 --- /dev/null +++ b/src/app/login/login.page.html @@ -0,0 +1,30 @@ + +
+
+ +
+
+ Welcome Back! +
+

+ Please login to your account +

+ +
+ +
+ +
+ + + + +
+ + Forgot Password? + + + + +
+
diff --git a/src/app/login/login.page.scss b/src/app/login/login.page.scss new file mode 100644 index 0000000..aae2011 --- /dev/null +++ b/src/app/login/login.page.scss @@ -0,0 +1,96 @@ +.login { + background-color: var(--background-blue); + height: 100vh; + overflow-y: auto; + display: block; +} + +.upfold { + display: block; + width: 100%; + padding-top: 10px; + + img { + object-fit: contain; + width: 100%; + } +} + +header { + font-size: 20px; + margin: 20px auto 0; + text-align: center; +} + +.description { + font-size: 11px; + color: var(--brand-grey); + line-height: 1.5; + width: 70%; + margin: 10px auto 30px; + text-align: center; +} + +.input-holder { + display: flex; + width: 85%; + margin: 15px auto; + background-color: white; + justify-content: space-between; + align-items: center; + box-shadow: 0px 0px 5px var(--brand-grey); + border-radius: 5px; + overflow: hidden; + + ion-icon { + font-size: 20px; + margin: 0 15px; + color: var(--brand-voilet); + } + + input { + flex-grow: 1; + height: 38px; + font-size: 11px; + border: 0; + padding: 0 20px; + outline: none; + letter-spacing: 1px; + } +} + +.forgot-link { + font-weight: bold; + color: var(--brand-voilet); + font-size: 10px; + letter-spacing: 0.5px; + width: 85%; + margin: 20px auto; + display: block; +} + +.login-button { + --background: var(--brand-voilet); + text-transform: none; + width: 85%; + margin: 0 auto 20px; + font-size: 12px; + height: 42px; + letter-spacing: 0; + font-weight: 400; +} + +.signin-description { + font-size: 11px; + color: var(--brand-grey); + line-height: 1.5; + width: 70%; + text-align: center; + margin: 0 auto 20px; + + a { + color: var(--brand-voilet); + font-family: 'M PLUS Rounded 1c'; + font-weight: bold; + } +} diff --git a/src/app/login/login.page.spec.ts b/src/app/login/login.page.spec.ts new file mode 100644 index 0000000..e6ff074 --- /dev/null +++ b/src/app/login/login.page.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LoginPage } from './login.page'; + +describe('LoginPage', () => { + let component: LoginPage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ LoginPage ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(LoginPage); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/login/login.page.ts b/src/app/login/login.page.ts new file mode 100644 index 0000000..3dc6315 --- /dev/null +++ b/src/app/login/login.page.ts @@ -0,0 +1,28 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; + +@Component({ + selector: 'app-login', + templateUrl: './login.page.html', + styleUrls: ['./login.page.scss'], +}) +export class LoginPage implements OnInit { + credentials = { + email: null, + password: null + } + + show_password = false; + + constructor( + private router: Router + ) { } + + ngOnInit() { + } + + signup() { + this.router.navigate(['/onboarding']); + } + +} diff --git a/src/app/onboarding/onboarding.page.html b/src/app/onboarding/onboarding.page.html index 5c1466b..d2303f3 100644 --- a/src/app/onboarding/onboarding.page.html +++ b/src/app/onboarding/onboarding.page.html @@ -18,7 +18,7 @@ Get Started

- Already have account? Sign in + Already have account? Sign in

@@ -55,7 +55,7 @@ Continue -

+

Not Now

@@ -126,7 +126,8 @@ [(ngModel)]="credentials.password" (input)="checkPassword()"> - + + @@ -171,7 +172,7 @@ Continue - diff --git a/src/app/onboarding/onboarding.page.ts b/src/app/onboarding/onboarding.page.ts index 9998b93..67d9c6f 100644 --- a/src/app/onboarding/onboarding.page.ts +++ b/src/app/onboarding/onboarding.page.ts @@ -1,4 +1,5 @@ import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; @Component({ selector: 'app-onboarding', @@ -17,7 +18,9 @@ export class OnboardingPage implements OnInit { has_upper = false; has_special = false; - constructor() { } + constructor( + private router: Router + ) { } ngOnInit() { this.slideOpts = { @@ -64,4 +67,8 @@ export class OnboardingPage implements OnInit { document.querySelector('ion-slides').slidePrev(400); } + signin() { + this.router.navigate(['/login']); + } + } diff --git a/src/global.scss b/src/global.scss index 373d94e..d6bdcc6 100644 --- a/src/global.scss +++ b/src/global.scss @@ -27,7 +27,7 @@ @import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap'); -@import url('https://fonts.googleapis.com/css?family=M+PLUS+Rounded+1c:400&display=swap'); +@import url('https://fonts.googleapis.com/css?family=M+PLUS+Rounded+1c:400,500&display=swap'); ion-button, button, a, p, div, input { font-family: 'Roboto', sans-serif;