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:
commit
e916c81441
3 changed files with 6 additions and 26 deletions
|
@ -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 {
|
||||||
|
|
|
@ -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';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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>';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue