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

@ -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,