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

update card layouts

This commit is contained in:
Luke Pulverenti 2016-12-01 12:38:13 -05:00
parent 99ae92bad7
commit 3a7fbb7777
14 changed files with 155 additions and 58 deletions

View file

@ -38,16 +38,16 @@
return Sections.loadRecentlyAdded(elem, user);
}
else if (section == 'librarytiles') {
return Sections.loadLibraryTiles(elem, user, 'backdrop', index, false);
return Sections.loadLibraryTiles(elem, user, 'backdrop', index);
}
else if (section == 'smalllibrarytiles') {
return Sections.loadLibraryTiles(elem, user, 'smallBackdrop', index, false);
return Sections.loadLibraryTiles(elem, user, 'smallBackdrop', index);
}
else if (section == 'smalllibrarytiles-automobile') {
return Sections.loadLibraryTiles(elem, user, 'smallBackdrop', index, true);
return Sections.loadLibraryTiles(elem, user, 'smallBackdrop', index);
}
else if (section == 'librarytiles-automobile') {
return Sections.loadLibraryTiles(elem, user, 'backdrop', index, true);
return Sections.loadLibraryTiles(elem, user, 'backdrop', index);
}
else if (section == 'librarybuttons') {
return Sections.loadlibraryButtons(elem, userId, index);

View file

@ -48,7 +48,7 @@
itemsContainer: elem,
shape: "backdrop",
preferThumb: true,
showTitle: false,
showTitle: true,
scalable: true,
showItemCounts: true,
centerText: true,

View file

@ -396,17 +396,13 @@
});
}
function loadLibraryTiles(elem, user, shape, index, autoHideOnMobile) {
function loadLibraryTiles(elem, user, shape) {
return getUserViews(user.Id).then(function (items) {
var html = '';
if (autoHideOnMobile) {
html += '<div class="hiddenSectionOnMobile">';
} else {
html += '<div>';
}
html += '<div>';
if (items.length) {
@ -415,7 +411,7 @@
html += '</div>';
var scrollX = enableScrollX() && dom.getWindowSize().innerWidth >= 600;
var scrollX = enableScrollX() && dom.getWindowSize().innerWidth >= 500;
if (scrollX) {
html += '<div is="emby-itemscontainer" class="hiddenScrollX itemsContainer">';
@ -425,7 +421,7 @@
html += cardBuilder.getCardsHtml({
items: items,
shape: scrollX ? 'overflowBackdrop' : shape,
shape: scrollX ? 'overflowSmallBackdrop' : shape,
showTitle: true,
centerText: true,
overlayText: false,
@ -438,12 +434,6 @@
html += '</div>';
if (autoHideOnMobile) {
html += '<div class="hiddenSectionOnNonMobile" style="margin-top:1em;">';
html += getLibraryButtonsHtml(items);
html += '</div>';
}
return getAppInfo().then(function (infoHtml) {
elem.innerHTML = html + infoHtml;
@ -497,7 +487,7 @@
}
var supportsImageAnalysis = appHost.supports('imageanalysis');
var cardLayout = appHost.preferVisualCards;
var cardLayout = supportsImageAnalysis;
html += cardBuilder.getCardsHtml({
items: result.Items,

View file

@ -99,7 +99,7 @@
var container = view.querySelector('#resumableItems');
var supportsImageAnalysis = appHost.supports('imageanalysis');
var cardLayout = appHost.preferVisualCards;
var cardLayout = supportsImageAnalysis;
cardBuilder.buildCards(result.Items, {
itemsContainer: container,

View file

@ -49,7 +49,7 @@
itemsContainer: elem,
shape: "backdrop",
preferThumb: true,
showTitle: false,
showTitle: true,
scalable: true,
showItemCounts: true,
centerText: true,