Game header fixes

This commit is contained in:
Roman Cervantes 2018-10-26 22:21:46 -07:00
parent e25ea34bec
commit 361f165716

View file

@ -34,7 +34,7 @@ export default {
},
computed: {
...mapState(['game']),
...mapState(['game', 'platform']),
coverUrl() {
const url = 'https://images.igdb.com/igdb/image/upload/t_cover_big/';
@ -45,7 +45,7 @@ export default {
style() {
return this.game && this.game.screenshots
? `background-image: url(${this.getImageUrl(this.game.screenshots[0].cloudinary_id)});`
? `background: url(${this.getImageUrl(this.game.screenshots[0].cloudinary_id)}) ${this.platform.hex} center center; background-size: cover`
: '';
},
@ -73,25 +73,19 @@ export default {
width: 100%;
position: relative;
align-items: center;
background-size: 100%;
background-repeat: no-repeat;
background-position: 50%;
background-color: $color-red;
@media($small) {
background-size: cover;
background-position: center;
}
.game-cover {
margin: $gp;
border: 5px solid $color-white;
background-size: contain;
min-width: 150px;
width: auto;
height: 200px;
@media($small) {
border: 3px solid $color-white;
height: 140px;
min-width: auto;
}
}