mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
use backdrops in grid view
This commit is contained in:
parent
e37f1d2fbc
commit
1613e7f451
2 changed files with 22 additions and 8 deletions
|
@ -62,7 +62,7 @@
|
|||
}
|
||||
|
||||
.libraryGridImage {
|
||||
width: 50px;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.thName, .tdName {
|
||||
|
@ -83,11 +83,12 @@
|
|||
.libraryItemsGrid th, .libraryItemsGrid td {
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
padding: 10px;
|
||||
padding: 10px 10px 5px;
|
||||
}
|
||||
|
||||
.libraryItemsGrid th {
|
||||
padding-bottom: 1em;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.libraryItemsGrid td {
|
||||
|
|
|
@ -53,19 +53,32 @@
|
|||
|
||||
var url = "itemdetails.html?id=" + item.Id;
|
||||
|
||||
var imageTags = item.ImageTags;
|
||||
|
||||
html += '<a href="' + url + '">';
|
||||
|
||||
if (imageTags.Primary) {
|
||||
if (item.BackdropImageTags && item.BackdropImageTags.length) {
|
||||
|
||||
html += '<img class="libraryGridImage" src="' + ApiClient.getImageUrl(item.Id, {
|
||||
type: "Primary",
|
||||
height: 100,
|
||||
tag: item.ImageTags.Primary
|
||||
type: "Backdrop",
|
||||
width: 240,
|
||||
tag: item.BackdropImageTags[0],
|
||||
index: 0
|
||||
}) + '" />';
|
||||
|
||||
}
|
||||
else if (item.ImageTags && item.ImageTags.Thumb) {
|
||||
html += '<img class="libraryGridImage" src="' + ApiClient.getImageUrl(item.Id, {
|
||||
type: "Thumb",
|
||||
width: 240,
|
||||
tag: item.ImageTags.Thumb
|
||||
}) + '" />';
|
||||
}
|
||||
else if (item.ImageTags && item.ImageTags.Primary) {
|
||||
html += '<img class="libraryGridImage" src="' + ApiClient.getImageUrl(item.Id, {
|
||||
type: "Primary",
|
||||
width: 240,
|
||||
tag: item.ImageTags.Primary
|
||||
}) + '" />';
|
||||
}
|
||||
else {
|
||||
html += '<img class="libraryGridImage" style="background:' + LibraryBrowser.getMetroColor(item.Id) + ';" src="css/images/items/list/video.png" />';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue