File tree Expand file tree Collapse file tree 18 files changed +233
-86
lines changed Expand file tree Collapse file tree 18 files changed +233
-86
lines changed Original file line number Diff line number Diff line change
1
+ < div class ="auth-wrapper ">
2
+ < app-header-auth > </ app-header-auth >
3
+ < router-outlet > </ router-outlet >
4
+ </ div >
Original file line number Diff line number Diff line change
1
+ import { ComponentFixture , TestBed } from '@angular/core/testing' ;
2
+
3
+ import { AuthComponent } from './auth.component' ;
4
+
5
+ describe ( 'AuthComponent' , ( ) => {
6
+ let component : AuthComponent ;
7
+ let fixture : ComponentFixture < AuthComponent > ;
8
+
9
+ beforeEach ( async ( ) => {
10
+ await TestBed . configureTestingModule ( {
11
+ declarations : [ AuthComponent ]
12
+ } )
13
+ . compileComponents ( ) ;
14
+ } ) ;
15
+
16
+ beforeEach ( ( ) => {
17
+ fixture = TestBed . createComponent ( AuthComponent ) ;
18
+ component = fixture . componentInstance ;
19
+ fixture . detectChanges ( ) ;
20
+ } ) ;
21
+
22
+ it ( 'should create' , ( ) => {
23
+ expect ( component ) . toBeTruthy ( ) ;
24
+ } ) ;
25
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import { Component } from '@angular/core' ;
2
+
3
+ @Component ( {
4
+ selector : 'app-auth' ,
5
+ templateUrl : './auth.component.html' ,
6
+ styleUrls : [ './auth.component.scss' ]
7
+ } )
8
+ export class AuthComponent { }
Original file line number Diff line number Diff line change @@ -2,19 +2,24 @@ import { CommonModule } from '@angular/common';
2
2
import { NgModule } from '@angular/core' ;
3
3
import { RouterModule } from '@angular/router' ;
4
4
5
+ import { ComponentsModule as CoreComponentsModule } from '@components/components.module' ;
6
+
7
+ import { AuthComponent } from './auth.component' ;
5
8
import { ComponentsModule } from './components/components.module' ;
6
9
import { LoginComponent } from './login/login.component' ;
7
10
import { RegisterComponent } from './register/register.component' ;
8
11
9
12
@NgModule ( {
10
13
declarations : [
11
14
LoginComponent ,
12
- RegisterComponent
15
+ RegisterComponent ,
16
+ AuthComponent
13
17
] ,
14
18
imports : [
15
19
CommonModule ,
16
20
RouterModule ,
17
- ComponentsModule
21
+ ComponentsModule ,
22
+ CoreComponentsModule
18
23
]
19
24
} )
20
25
export class AuthModule { }
Original file line number Diff line number Diff line change 1
1
import { NgModule } from "@angular/core" ;
2
2
import { RouterModule , Routes } from "@angular/router" ;
3
3
4
+ import { AuthComponent } from "./auth.component" ;
4
5
import { LoginComponent } from "./login/login.component" ;
5
6
import { RegisterComponent } from "./register/register.component" ;
6
7
7
8
const routes : Routes = [
8
- {
9
- path : 'login' ,
10
- component : LoginComponent
11
- } ,
12
- {
13
- path : 'register' ,
14
- component : RegisterComponent
15
- }
9
+ {
10
+ path : '' ,
11
+ component : AuthComponent ,
12
+ children : [
13
+ {
14
+ path : 'login' ,
15
+ component : LoginComponent
16
+ } ,
17
+ {
18
+ path : 'register' ,
19
+ component : RegisterComponent
20
+ } ,
21
+ ] ,
22
+ } ,
16
23
] ;
17
24
18
25
@NgModule ( {
Original file line number Diff line number Diff line change 1
- < div class ="auth-wrapper ">
2
- < div class ="container ">
3
- < section class ="logo-content ">
4
- < div class ="logo ">
5
- < img src ="" alt ="logo_image ">
6
- </ div >
7
- < img src ="assets/images/login.svg " alt ="media " class ="login-image ">
8
- </ section >
9
- < section class ="form-group ">
10
- < div class ="main ">
11
- < span class ="title "> Iniciar sesión</ span >
12
- < span class ="sign-up "> ¿No tienes una cuenta?
13
- < a routerLink ="/register "> Regístrate</ a >
14
- </ span >
15
- </ div >
16
- < app-login-form
17
- (loginData) ="login($event) "
18
- [showErrors] ="showErrors "
19
- [errors] ="errors "
20
- > </ app-login-form >
21
- </ section >
22
- </ div >
1
+ < div class ="container ">
2
+ < figure >
3
+ < img src ="assets/images/login.svg " alt ="media " class ="login-image ">
4
+ </ figure >
5
+ < section class ="form-group ">
6
+ < div class ="main ">
7
+ < span class ="title "> Iniciar sesión</ span >
8
+ < span class ="sign-up "> ¿No tienes una cuenta?
9
+ < a routerLink ="/register "> Regístrate</ a >
10
+ </ span >
11
+ </ div >
12
+ < app-login-form
13
+ (loginData) ="login($event) "
14
+ [showErrors] ="showErrors "
15
+ [errors] ="errors "
16
+ > </ app-login-form >
17
+ </ section >
23
18
</ div >
Original file line number Diff line number Diff line change 1
1
@import ' settings/_colors.scss' ;
2
2
@import ' settings/_typography.scss' ;
3
3
4
- .logo-content {
5
- flex : 2 ;
6
- }
7
-
8
- .logo {
9
- position : absolute ;
10
- top : 1rem ;
11
- left : 1rem ;
12
- }
13
4
14
- .login-image {
15
- width : 100% ;
16
- height : 100% ;
17
- max-width : 80rem ;
18
- background-repeat : no-repeat ;
19
- background-size : cover ;
20
- background-position : center ;
21
- }
22
5
23
6
24
7
.options {
Original file line number Diff line number Diff line change 1
- < div class ="auth-wrapper ">
2
- < div class ="container ">
3
- < section class ="logo-content ">
4
- < div class ="logo ">
5
- < img src ="" alt ="logo_image ">
6
- </ div >
7
- < img src ="assets/images/register.svg " alt ="media " class ="register-image ">
8
- </ section >
9
- < section class ="form-group ">
10
- < div class ="main ">
11
- < span class ="title "> Regístrate</ span >
12
- < span class ="sign-up "> ¿Ya tienes una cuenta?
13
- < a routerLink ="/login "> Inicia sesión</ a >
14
- </ span >
15
- </ div >
16
- < app-register-form
17
- (registerData) ="createAccount($event) "
18
- [showErrors] ="showErrors "
19
- [errors] ="errors "
20
- > </ app-register-form >
21
- </ section >
22
- </ div >
1
+ < div class ="container ">
2
+ < figure >
3
+ < img src ="assets/images/register.svg " alt ="media " class ="register-image ">
4
+ </ figure >
5
+ < section class ="form-group ">
6
+ < div class ="main ">
7
+ < span class ="title "> Regístrate</ span >
8
+ < span class ="sign-up "> ¿Ya tienes una cuenta?
9
+ < a routerLink ="/login "> Inicia sesión</ a >
10
+ </ span >
11
+ </ div >
12
+ < app-register-form
13
+ (registerData) ="createAccount($event) "
14
+ [showErrors] ="showErrors "
15
+ [errors] ="errors "
16
+ > </ app-register-form >
17
+ </ section >
23
18
</ div >
Original file line number Diff line number Diff line change @@ -5,12 +5,14 @@ import { RouterModule } from '@angular/router';
5
5
import { PipesModule } from '@pipes/pipes.module' ;
6
6
7
7
import { HeaderComponent } from './header/header.component' ;
8
+ import { HeaderAuthComponent } from './header-auth/header-auth.component' ;
8
9
import { SidebarComponent } from './sidebar/sidebar.component' ;
9
10
10
11
@NgModule ( {
11
12
declarations : [
12
13
SidebarComponent ,
13
- HeaderComponent
14
+ HeaderComponent ,
15
+ HeaderAuthComponent
14
16
] ,
15
17
imports : [
16
18
CommonModule ,
@@ -19,7 +21,8 @@ import { SidebarComponent } from './sidebar/sidebar.component';
19
21
] ,
20
22
exports : [
21
23
SidebarComponent ,
22
- HeaderComponent
24
+ HeaderComponent ,
25
+ HeaderAuthComponent
23
26
]
24
27
} )
25
28
export class ComponentsModule { }
You can’t perform that action at this time.
0 commit comments