-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(flex layout): added this module as a responsible layout instead …
…of do it by myself
- Loading branch information
Ismael Ramos
committed
Oct 19, 2017
1 parent
ae53c78
commit e8786e9
Showing
13 changed files
with
100 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
<footer> | ||
<span>{{ 'angularExampleApp' | translate }} 2017</span> | ||
<div class="flex-spacer"></div> | ||
<a href="https://angular.io/" target="_blank"><img src="assets/images/angular.svg"></a> | ||
</footer> | ||
<div fxFlex fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center center" | ||
class.xs="footer-xs"> | ||
<div fxFlex="80"> | ||
<span>{{ 'angularExampleApp' | translate }} 2017</span> | ||
</div> | ||
<div fxFlex class="text-right" class.xs="footer-xs"> | ||
<a href="https://angular.io/" target="_blank"><img src="assets/images/angular.svg"></a> | ||
</div> | ||
</div> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
footer { | ||
display: flex; | ||
flex-wrap: wrap; | ||
align-items: center; | ||
padding: 8px 16px; | ||
color: white; | ||
height: 3.6em; | ||
background: #3f51b5; | ||
margin-top: 2em; | ||
position: sticky; | ||
top: 100%; | ||
|
||
img { | ||
height: 4em; | ||
width: 25%; | ||
} | ||
} | ||
|
||
@media (max-width: 360px) { | ||
height: 50%; | ||
text-align: center; | ||
display: block; | ||
padding-top: 1em; | ||
} | ||
.footer-xs { | ||
text-align: center; | ||
padding-top: 1em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,33 @@ | ||
<h1 class="section-title">{{'topHeroes' | translate}}</h1> | ||
<mat-progress-spinner *ngIf="!heroes" | ||
class="progress-spinner" | ||
[color]="'primary'" | ||
[mode]="'indeterminate'"> | ||
</mat-progress-spinner> | ||
<div id="heroes-list" *ngIf="heroes"> | ||
<ng-container *ngFor="let hero of heroes"> | ||
<mat-card class="hero-card"> | ||
<mat-card-header> | ||
<div mat-card-avatar class="hero-header-image" | ||
[ngStyle]="{'background-image': 'url(assets/images/heroes/' + hero.id + '-thumbnail.jpg)'}"></div> | ||
<mat-card-title>{{hero.name}}</mat-card-title> | ||
<mat-card-subtitle>{{hero.alterEgo}}</mat-card-subtitle> | ||
<div class="flex-spacer"></div> | ||
<div class="hero-actions"> | ||
{{hero.likes}} | ||
<mat-icon matTooltip="{{(canVote ? 'canVote' : 'cannotVote') | translate}}" | ||
[matTooltipPosition]="'above'" | ||
class="like-icon" (click)="like(hero)">favorite | ||
</mat-icon> | ||
</div> | ||
</mat-card-header> | ||
<img mat-card-image src="assets/images/heroes/{{hero.id}}.jpg"> | ||
</mat-card> | ||
</ng-container> | ||
<div fxLayout="row"> | ||
<div fxFlex="10" fxFlex.gt-sm="20"></div> | ||
<div fxFlex="90" fxFlex.gt-sm="80"> | ||
<h1 class="section-title">{{'topHeroes' | translate}}</h1> | ||
<mat-progress-spinner *ngIf="!heroes" | ||
class="progress-spinner" | ||
[color]="'primary'" | ||
[mode]="'indeterminate'"> | ||
</mat-progress-spinner> | ||
<div id="heroes-list" *ngIf="heroes"> | ||
<ng-container *ngFor="let hero of heroes"> | ||
<mat-card class="hero-card"> | ||
<mat-card-header> | ||
<div mat-card-avatar class="hero-header-image" | ||
[ngStyle]="{'background-image': 'url(assets/images/heroes/' + hero.id + '-thumbnail.jpg)'}"></div> | ||
<mat-card-title>{{hero.name}}</mat-card-title> | ||
<mat-card-subtitle>{{hero.alterEgo}}</mat-card-subtitle> | ||
<div class="flex-spacer"></div> | ||
<div class="hero-actions"> | ||
{{hero.likes}} | ||
<mat-icon matTooltip="{{(canVote ? 'canVote' : 'cannotVote') | translate}}" | ||
[matTooltipPosition]="'above'" | ||
class="like-icon" (click)="like(hero)">favorite | ||
</mat-icon> | ||
</div> | ||
</mat-card-header> | ||
<img mat-card-image src="assets/images/heroes/{{hero.id}}.jpg"> | ||
</mat-card> | ||
</ng-container> | ||
</div> | ||
</div> | ||
<div fxFlex="10" fxFlex.gt-sm="20"></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
} | ||
|
||
.hero-card { | ||
width: 45%; | ||
margin: 2em auto; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,3 +79,7 @@ snack-bar-container { | |
height: 55px !important; | ||
width: 55px !important; | ||
} | ||
|
||
.text-right { | ||
text-align: right; | ||
} |