Skip to content

Commit 7dc9ce6

Browse files
layout - parte 2
1 parent 8b0a95e commit 7dc9ce6

File tree

82 files changed

+1159
-39
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1159
-39
lines changed

ambulance/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",
7+
"start:max": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng serve",
78
"start:mem": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng serve --open",
89
"build": "ng build",
910
"test": "ng test",
Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,45 @@
11
import { NgModule } from '@angular/core';
22
import { Routes, RouterModule } from '@angular/router';
3+
import { PageLoginComponent } from './core/presentation/pages/page-login/page-login.component';
34

4-
const routes: Routes = [];
5+
const routes: Routes = [
6+
{
7+
path: 'auth',
8+
component: PageLoginComponent,
9+
},
10+
{
11+
path: 'dashboard',
12+
loadChildren: () =>
13+
import('./dashboard/dashboard.module').then((m) => m.DashboardModule),
14+
},
15+
{
16+
path: 'medics',
17+
loadChildren: () =>
18+
import('./medics/medics.module').then((m) => m.MedicsModule),
19+
},
20+
{
21+
path: 'users',
22+
loadChildren: () =>
23+
import('./users/users.module').then((m) => m.UsersModule),
24+
},
25+
{
26+
path: 'drivers',
27+
loadChildren: () =>
28+
import('./drivers/drivers.module').then((m) => m.DriversModule),
29+
},
30+
{
31+
path: 'histories',
32+
loadChildren: () =>
33+
import('./histories/histories.module').then((m) => m.HistoriesModule),
34+
},
35+
{
36+
path: '**',
37+
redirectTo: 'auth',
38+
},
39+
];
540

641
@NgModule({
742
imports: [RouterModule.forRoot(routes)],
8-
exports: [RouterModule]
43+
exports: [RouterModule],
944
})
10-
export class AppRoutingModule { }
45+
export class AppRoutingModule {}

ambulance/src/app/app.component.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,15 @@ mat-sidenav {
88
width: 280px;
99
background-color: rgb(45, 50, 62);
1010
}
11+
12+
.logo {
13+
padding: 0 24px;
14+
background-color: rgb(30, 33, 41);
15+
color: hsla(0, 0%, 100%, 0.7) !important;
16+
}
17+
18+
.logo h3 {
19+
line-height: 64px;
20+
margin: 0;
21+
padding: 0;
22+
}
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
<mat-sidenav-container>
2-
<mat-sidenav opened="true" mode="side">Menu</mat-sidenav>
2+
<mat-sidenav opened="true" mode="side">
3+
<div class="logo" fxLayout fxLayoutGap="20px" fxLayoutAlign="start center">
4+
<mat-icon svgIcon="logo"></mat-icon>
5+
<h3>Sistema de historias</h3>
6+
</div>
7+
<amb-menu></amb-menu>
8+
</mat-sidenav>
39
<mat-sidenav-content>
410
<amb-header></amb-header>
11+
<router-outlet></router-outlet>
512
</mat-sidenav-content>
613
</mat-sidenav-container>

ambulance/src/app/app.module.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,22 @@ import { LoginComponent } from './login.component';
77
import { ItemComponent } from './item/item.component';
88
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
99
import { CoreModule } from './core/core.module';
10-
import { MatSidenavModule } from '@angular/material/sidenav';
10+
import { IconService } from './shared/services/icon.service';
11+
import { HttpClientModule } from '@angular/common/http';
12+
import { SharedModule } from './shared/shared.module';
1113
@NgModule({
1214
declarations: [AppComponent, LoginComponent, ItemComponent],
1315
imports: [
1416
BrowserModule,
1517
AppRoutingModule,
1618
BrowserAnimationsModule,
17-
MatSidenavModule,
19+
HttpClientModule,
20+
SharedModule,
1821
CoreModule,
1922
],
2023
providers: [],
2124
bootstrap: [AppComponent],
2225
})
23-
export class AppModule {}
26+
export class AppModule {
27+
constructor(private readonly iconService: IconService) {}
28+
}

ambulance/src/app/core/core.module.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@ import { MatButtonModule } from '@angular/material/button';
66
import { MatIconModule } from '@angular/material/icon';
77
import { FlexLayoutModule } from '@angular/flex-layout';
88
import { MatMenuModule } from '@angular/material/menu';
9+
import { MenuComponent } from './presentation/views/menu/menu.component';
10+
import { MatListModule } from '@angular/material/list';
11+
import { PageLoginComponent } from './presentation/pages/page-login/page-login.component';
12+
import { RouterModule } from '@angular/router';
913

1014
@NgModule({
11-
declarations: [HeaderComponent],
15+
declarations: [HeaderComponent, MenuComponent, PageLoginComponent],
1216
imports: [
1317
CommonModule,
1418
MatToolbarModule,
1519
MatButtonModule,
1620
MatIconModule,
1721
FlexLayoutModule,
1822
MatMenuModule,
23+
MatListModule,
24+
RouterModule,
1925
],
20-
exports: [HeaderComponent],
26+
exports: [HeaderComponent, MenuComponent, PageLoginComponent],
2127
})
2228
export class CoreModule {}

ambulance/src/app/core/presentation/pages/page-login/page-login.component.css

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>page-login works!</p>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'amb-page-login',
5+
templateUrl: './page-login.component.html',
6+
styleUrls: ['./page-login.component.css']
7+
})
8+
export class PageLoginComponent implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit(): void {
13+
}
14+
15+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
mat-nav-list {
2+
width: 95%;
3+
}
4+
5+
mat-list-item {
6+
transition: 0.2s all;
7+
border-radius: 0 24px 24px 0;
8+
}
9+
10+
mat-list-item:hover {
11+
background-color: #039be5 !important;
12+
}
13+
14+
.activeLink {
15+
background-color: #039be5 !important;
16+
}
17+
18+
a,
19+
a:link,
20+
a:visited,
21+
a:active {
22+
color: white;
23+
font-size: 14px;
24+
font-family: muliregular;
25+
}

0 commit comments

Comments
 (0)