mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
improve poster sizing
This commit is contained in:
parent
48ea645cf9
commit
cd1e583fa7
58 changed files with 931 additions and 549 deletions
|
@ -343,13 +343,6 @@
|
|||
$('#themeSongsCollapsible', page).hide();
|
||||
$('#themeVideosCollapsible', page).hide();
|
||||
|
||||
if (!item.SoundtrackIds || !item.SoundtrackIds.length) {
|
||||
$('#soundtracksCollapsible', page).hide();
|
||||
} else {
|
||||
$('#soundtracksCollapsible', page).show();
|
||||
renderSoundtracks(page, item);
|
||||
}
|
||||
|
||||
if (item.Type == "MusicAlbum") {
|
||||
renderMusicVideos(page, item, user);
|
||||
} else {
|
||||
|
@ -507,31 +500,6 @@
|
|||
return html;
|
||||
}
|
||||
|
||||
function renderSoundtracks(page, item) {
|
||||
|
||||
if (item.Type == "MusicAlbum") {
|
||||
$('#soundtracksHeader', page).html("This album is the soundtrack for ...");
|
||||
} else {
|
||||
$('#soundtracksHeader', page).html("Soundtrack(s)");
|
||||
}
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), {
|
||||
|
||||
Ids: item.SoundtrackIds.join(","),
|
||||
ItemFields: "PrimaryImageAspectRatio,ItemCounts,AudioInfo",
|
||||
SortBy: "SortName"
|
||||
|
||||
}).done(function (result) {
|
||||
|
||||
var html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: item.Type == "MusicAlbum" ? "portrait" : "square"
|
||||
});
|
||||
|
||||
$('#soundtracksContent', page).html(html);
|
||||
});
|
||||
}
|
||||
|
||||
function renderSiblingLinks(page, item, context) {
|
||||
|
||||
$('.lnkSibling', page).addClass('hide');
|
||||
|
@ -634,7 +602,7 @@
|
|||
|
||||
var html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: item.Type == "MusicAlbum" ? "square" : "portrait",
|
||||
shape: item.Type == "MusicAlbum" ? "detailPageSquare" : "detailPagePortrait",
|
||||
showParentTitle: item.Type == "MusicAlbum",
|
||||
centerText: item.Type != "MusicAlbum",
|
||||
showTitle: item.Type == "MusicAlbum" || item.Type == "Game",
|
||||
|
@ -642,7 +610,7 @@
|
|||
context: context
|
||||
});
|
||||
|
||||
$('#similarContent', page).html(html).createPosterItemMenus();
|
||||
$('#similarContent', page).html(html).createCardMenus();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -767,19 +735,21 @@
|
|||
if (item.Type == "Series") {
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "portrait",
|
||||
showTitle: true,
|
||||
shape: "detailPagePortrait",
|
||||
showTitle: false,
|
||||
centerText: true,
|
||||
context: context
|
||||
context: context,
|
||||
overlayText: true
|
||||
});
|
||||
}
|
||||
else if (item.Type == "Season") {
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "smallBackdrop",
|
||||
shape: "detailPage169",
|
||||
showTitle: true,
|
||||
displayAsSpecial: item.Type == "Season" && item.IndexNumber,
|
||||
context: context
|
||||
context: context,
|
||||
overlayText: true
|
||||
});
|
||||
}
|
||||
else if (item.Type == "GameSystem") {
|
||||
|
@ -792,7 +762,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
$('#childrenContent', page).html(html).createPosterItemMenus();
|
||||
$('#childrenContent', page).html(html).createCardMenus();
|
||||
|
||||
if (item.Type == "BoxSet") {
|
||||
|
||||
|
@ -865,7 +835,7 @@
|
|||
renderCollectionItemType(page, { name: 'Titles' }, items, user);
|
||||
}
|
||||
|
||||
$('.collectionItems', page).trigger('create').createPosterItemMenus();
|
||||
$('.collectionItems', page).trigger('create').createCardMenus();
|
||||
}
|
||||
|
||||
function renderCollectionItemType(page, type, items, user, context) {
|
||||
|
@ -885,7 +855,7 @@
|
|||
|
||||
html += '<div class="detailSectionContent">';
|
||||
|
||||
var shape = type.type == 'MusicAlbum' ? 'square' : 'portrait';
|
||||
var shape = type.type == 'MusicAlbum' ? 'detailPageSquare' : 'detailPagePortrait';
|
||||
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: items,
|
||||
|
@ -1101,7 +1071,7 @@
|
|||
|
||||
var onclick = item.PlayAccess == 'Full' ? ' onclick="ItemDetailPage.play(' + chapter.StartPositionTicks + ');"' : '';
|
||||
|
||||
html += '<a class="card card-16-9 manualSize detailPage169Card" href="#play-Chapter-' + i + '"' + onclick + '>';
|
||||
html += '<a class="card detailPage169Card" href="#play-Chapter-' + i + '"' + onclick + '>';
|
||||
|
||||
html += '<div class="cardBox">';
|
||||
html += '<div class="cardScalable">';
|
||||
|
@ -1306,7 +1276,7 @@
|
|||
|
||||
var item = items[i];
|
||||
|
||||
var cssClass = "card card-16-9 manualSize detailPage169Card";
|
||||
var cssClass = "card detailPage169Card";
|
||||
|
||||
var href = "itemdetails.html?id=" + item.Id;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue