Fix bug when game has no cover in IGDB

This commit is contained in:
Simon Grimme
2022-07-25 11:34:22 +02:00
parent b86544b22a
commit 206272b50b
5 changed files with 29 additions and 11 deletions
@@ -1,4 +1,5 @@
<a routerLink="/game/{{game.slug}}">
<div class="game-cover-container shine" [style.background-image]="'url(v1/images/' + game.coverId + ')'">
<div class="game-cover-container shine" [style.background-image]="'url(v1/images/' + game.coverId + ')'" fxLayoutAlign="center end">
<h2 *ngIf="game.coverId === 'nocover'" class="no-link-stlying">{{game.title}}</h2>
</div>
</a>
@@ -49,3 +49,8 @@
}
}
}
.no-link-styling a:hover, a:visited, a:link, a:active {
text-decoration: none;
color: black;
}
@@ -1,8 +1,8 @@
<div fxLayout="row" fxLayoutAlign="center" style="margin-top: 16px;">
<div fxLayout="column" fxFlex="0 1 70" fxLayoutGap="16px" fxFlex.lt-xl="95">
<div fxLayout="row" fxLayoutGap="16px">
<div fxLayout="row" fxLayout.lt-lg="column" fxLayoutGap="16px">
<img src="v1/images/{{game.coverId}}" alt="Game cover">
<img style="max-width: 352px;" src="v1/images/{{game.coverId}}" alt="Game cover">
<div fxFlex="40" fxLayout="column" id="game-details">
<h1>{{game.title}}</h1>
@@ -13,9 +13,12 @@
<div fxLayout="column" fxFlex="40" fxLayoutGap="16px">
<button mat-raised-button color="primary" (click)="downloadGame()">
Download ({{bytesAsHumanReadableString(game.diskSize)}})
</button>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="16px">
<button mat-raised-button color="primary" (click)="downloadGame()">
<mat-icon>download</mat-icon>
</button>
<b style="font-size: 24px">Download ({{bytesAsHumanReadableString(game.diskSize)}})</b>
</div>
<div fxLayout="column" fxLayoutGap="24px">
<div *ngIf="game.genres !== undefined && game.genres.length > 0">