1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #1827 from thornbill/under-cover

Fix TV channel logo size
This commit is contained in:
dkanada 2020-08-22 07:42:42 +09:00 committed by GitHub
commit e916c81441
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 26 deletions

View file

@ -239,33 +239,13 @@ button::-moz-focus-inner {
border: none; border: none;
} }
.cardImage-img {
max-height: 100%;
max-width: 100%;
/* This is simply for lazy image purposes, to ensure the image is visible sooner when scrolling */
min-height: 70%;
min-width: 70%;
margin: auto;
}
.coveredImage-img {
width: 100%;
height: 100%;
}
.coveredImage-noscale-img {
max-height: none;
max-width: none;
}
.coveredImage { .coveredImage {
background-size: cover; background-size: cover;
background-position: center center; background-position: center center;
} }
.coveredImage-noScale { .coveredImage.coveredImage-contain {
background-size: cover; background-size: contain;
} }
.cardFooter { .cardFooter {

View file

@ -1212,8 +1212,8 @@ import 'programStyles';
if (coveredImage) { if (coveredImage) {
cardImageContainerClass += ' coveredImage'; cardImageContainerClass += ' coveredImage';
if (item.MediaType === 'Photo' || item.Type === 'PhotoAlbum' || item.Type === 'Folder' || item.ProgramInfo || item.Type === 'Program' || item.Type === 'Recording') { if (item.Type === 'TvChannel') {
cardImageContainerClass += ' coveredImage-noScale'; cardImageContainerClass += ' coveredImage-contain';
} }
} }

View file

@ -115,11 +115,11 @@ import 'emby-checkbox';
tag: user.PrimaryImageTag, tag: user.PrimaryImageTag,
type: 'Primary' type: 'Primary'
}); });
html += '<div class="cardImageContainer coveredImage coveredImage-noScale" style="background-image:url(\'' + imgUrl + "');\"></div>"; html += '<div class="cardImageContainer coveredImage" style="background-image:url(\'' + imgUrl + "');\"></div>";
} else { } else {
const background = getMetroColor(user.Id); const background = getMetroColor(user.Id);
imgUrl = 'assets/img/avatar.png'; imgUrl = 'assets/img/avatar.png';
html += '<div class="cardImageContainer coveredImage coveredImage-noScale" style="background-image:url(\'' + imgUrl + "');background-color:" + background + ';"></div>'; html += '<div class="cardImageContainer coveredImage" style="background-image:url(\'' + imgUrl + "');background-color:" + background + ';"></div>';
} }
html += '</div>'; html += '</div>';