mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Lazy loading enabled
All pages with lots of images now have lazy loading enabled. The "animation" was removed since it made for a bit of an odd experience one the 2nd visit to a page. On pages with lots of images this has a nice impact as it only loads the images that the user can see initially. As a user scrolls it loads the next ones up. It saves a lot of extra requests initially.
This commit is contained in:
parent
ab0941be90
commit
f893f175cb
11 changed files with 41 additions and 31 deletions
|
@ -35,7 +35,8 @@
|
|||
shape: "backdrop",
|
||||
preferThumb: true,
|
||||
context: 'movies',
|
||||
selectionPanel: true
|
||||
selectionPanel: true,
|
||||
lazy: true
|
||||
});
|
||||
$('.itemsContainer', page).removeClass('timelineItemsContainer');
|
||||
}
|
||||
|
@ -45,7 +46,8 @@
|
|||
items: result.Items,
|
||||
shape: "banner",
|
||||
preferBanner: true,
|
||||
context: 'movies'
|
||||
context: 'movies',
|
||||
lazy: true
|
||||
});
|
||||
$('.itemsContainer', page).removeClass('timelineItemsContainer');
|
||||
}
|
||||
|
@ -69,7 +71,8 @@
|
|||
showTitle: true,
|
||||
timeline: true,
|
||||
centerText: true,
|
||||
selectionPanel: true
|
||||
selectionPanel: true,
|
||||
lazy: true
|
||||
});
|
||||
$('.itemsContainer', page).addClass('timelineItemsContainer');
|
||||
}
|
||||
|
@ -384,12 +387,4 @@
|
|||
updateFilterControls(this);
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$("body").on("create", function () {
|
||||
$(".lazy").unveil(200, function () {
|
||||
this.style.opacity = 1;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
Loading…
Add table
Add a link
Reference in a new issue