pull/3895/head
TidusJar 6 years ago
parent 585d870250
commit e13f2a28fa

@ -199,4 +199,8 @@
.keywords-panel {
margin-top: 8%;
}
.medium-font {
font-size:16px;
}

@ -10,6 +10,7 @@ import { MovieDetailsComponent } from "./movie/movie-details.component";
import { TvDetailsComponent } from "./tv/tv-details.component";
import { PipeModule } from "../pipes/pipe.module";
import { YoutubeTrailerComponent } from "./youtube-trailer.component";
import { MovieInformationPanelComponent } from "./movie/panels/movie-information-panel.component";
const routes: Routes = [
{ path: "movie/:movieDbId", component: MovieDetailsComponent },
@ -27,6 +28,7 @@ const routes: Routes = [
MovieDetailsComponent,
YoutubeTrailerComponent,
TvDetailsComponent,
MovieInformationPanelComponent,
],
exports: [
RouterModule,

@ -104,57 +104,16 @@
</div>
<div class="row">
<div class="col-12 col-md-3">
<button *ngIf="movie.belongsToCollection" mat-raised-button
class="btn-spacing-below full-width mat-elevation-z8">{{movie.belongsToCollection.name}}</button>
<div class="col-12 col-md-3">
<button *ngIf="movie.belongsToCollection" mat-raised-button class="btn-spacing-below full-width mat-elevation-z8">{{movie.belongsToCollection.name}}</button>
<mat-card class="card-full mat-elevation-z8">
<mat-card-content>
<div>
<span><strong>Theatrical Release:</strong>
{{movie.releaseDate | date: 'mediumDate'}}</span></div>
<div>
<span *ngIf="movie.digitalReleaseDate"><strong>Digital Release:</strong>
{{movie.digitalReleaseDate | date:
'mediumDate'}}</span>
</div>
<div>
<span *ngIf="movie.voteAverage"><strong>User Score:</strong> {{movie.voteAverage |
number:'1.0-1'}}/10</span>
</div>
<div>
<span *ngIf="movie.voteCount"><strong>Votes:</strong> {{movie.voteCount |
thousandShort: 1}}</span>
</div>
<div>
<span><strong>Status:</strong> {{movie.status}}</span>
</div>
<div>
<span><strong>Runtime:</strong> {{movie.runtime}} Minutes</span>
</div>
<div>
<span *ngIf="movie.revenue"><strong>Revenue:</strong> {{movie.revenue | currency:
'USD'}}</span>
</div>
<div>
<span *ngIf="movie.budget"><strong>Budget:</strong>
{{movie.budget | currency: 'USD'}}</span>
</div>
<div *ngIf="movie.genres">
<strong>Genres:</strong>
<mat-chip-list>
<mat-chip *ngFor="let genre of movie.genres">
{{genre.name}}
</mat-chip>
</mat-chip-list>
</div>
<mat-card-content class="medium-font">
<movie-information-panel [movie]="movie"></movie-information-panel>
</mat-card-content>
</mat-card>
</div>
<div class="col-12 col-md-9">
<mat-card class="card-full mat-elevation-z8">
<mat-card-content>
@ -162,8 +121,6 @@
</mat-card-content>
</mat-card>
</div>
</div>

@ -0,0 +1,51 @@
<div>
<strong>Theatrical Release:</strong>
<div>
{{movie.releaseDate | date: 'mediumDate'}}
</div>
</div>
<div *ngIf="movie.digitalReleaseDate">
<strong>Digital Release:</strong>
<div>
{{movie.digitalReleaseDate | date: 'mediumDate'}}
</div>
</div>
<div *ngIf="movie.voteAverage">
<strong>User Score:</strong>
<div>
{{movie.voteAverage | number:'1.0-1'}} / 10
</div>
</div>
<div *ngIf="movie.voteCount">
<strong>Votes:</strong>
<div>
{{movie.voteCount | thousandShort: 1}}
</div>
</div>
<div>
<strong>Status:</strong>
<div>{{movie.status}}</div>
</div>
<div>
<strong>Runtime:</strong>
<div>{{movie.runtime}} Minutes</div>
</div>
<div *ngIf="movie.revenue">
<strong>Revenue:</strong>
<div> {{movie.revenue | currency: 'USD'}}</div>
</div>
<div *ngIf="movie.budget">
<strong>Budget:</strong>
<div> {{movie.budget | currency: 'USD'}}</div>
</div>
<div *ngIf="movie.genres">
<strong>Genres:</strong>
<div>
<mat-chip-list>
<mat-chip *ngFor="let genre of movie.genres">
{{genre.name}}
</mat-chip>
</mat-chip-list>
</div>
</div>

@ -0,0 +1,12 @@
import { Component, ViewEncapsulation, Input } from "@angular/core";
import { ISearchMovieResultV2 } from "../../../interfaces/ISearchMovieResultV2";
@Component({
templateUrl: "./movie-information-panel.component.html",
styleUrls: ["../../media-details.component.scss"],
selector: "movie-information-panel",
encapsulation: ViewEncapsulation.None
})
export class MovieInformationPanelComponent {
@Input() public movie: ISearchMovieResultV2;
}
Loading…
Cancel
Save