Skip to content

Commit 57cb646

Browse files
IsmaestroIsmael Ramos
authored andcommitted
feat(menu): fixed menu position
1 parent e6af0b1 commit 57cb646

4 files changed

Lines changed: 38 additions & 22 deletions

File tree

src/app/core/material.module.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
import {
22
MdAutocompleteModule,
33
MdButtonModule,
4-
MdCardModule, MdDialogModule,
4+
MdCardModule,
5+
MdDialogModule,
56
MdGridListModule,
67
MdIconModule,
7-
MdInputModule, MdListModule,
8+
MdInputModule,
9+
MdListModule,
810
MdMenuModule,
911
MdProgressBarModule,
1012
MdProgressSpinnerModule,
1113
MdSliderModule,
12-
MdSnackBarModule, MdTooltipModule
14+
MdSnackBarModule,
15+
MdTooltipModule
1316
} from '@angular/material';
1417
import {NgModule} from '@angular/core';
1518

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
1-
nav {
2-
display: flex;
3-
flex-wrap: wrap;
4-
align-items: center;
5-
padding: 8px 16px;
6-
color: white;
7-
height: 3em;
8-
background: #3f51b5;
1+
:host(toh-nav) {
2+
padding-top: 5em;
3+
display: grid;
94

10-
.mat-raised-button {
11-
color: #3f51b5;
12-
margin-right: 1em;
13-
}
5+
header {
6+
position: fixed;
7+
z-index: 999;
8+
width: 100%;
9+
10+
nav {
11+
display: flex;
12+
flex-wrap: wrap;
13+
align-items: center;
14+
padding: 8px 16px;
15+
color: white;
16+
height: 3em;
17+
background: #3f51b5;
1418

15-
.progress-bar {
16-
display: flex;
17-
align-content: center;
18-
align-items: center;
19-
height: 5px;
19+
.mat-raised-button {
20+
color: #3f51b5;
21+
margin-right: 1em;
22+
}
23+
24+
.progress-bar {
25+
display: flex;
26+
align-content: center;
27+
align-items: center;
28+
height: 5px;
29+
}
30+
}
2031
}
2132
}
33+

src/app/heroes/hero-top/hero-top.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ <h1 class="section-title">{{'topHeroes' | translate}}</h1>
1717
{{hero.likes}}
1818
<md-icon mdTooltip="{{(canVote ? 'canVote' : 'cannotVote') | translate}}"
1919
[mdTooltipPosition]="'above'"
20-
class="like-icon" (click)="like(hero)">favorite</md-icon>
20+
class="like-icon" (click)="like(hero)">favorite
21+
</md-icon>
2122
</div>
2223
</md-card-header>
2324
<img md-card-image src="assets/images/heroes/{{hero.id}}.jpg">

src/polyfills.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ import 'rxjs/add/operator/switchMap';
2929
import 'rxjs/add/operator/toPromise';
3030
import 'rxjs/add/operator/startWith';
3131

32-
import 'hammerjs';
32+
import 'hammerjs';

0 commit comments

Comments
 (0)