Reorganize home stats order

This commit is contained in:
JonnyWong16 2021-03-15 17:16:17 -07:00
commit d965d3c36e
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
3 changed files with 96 additions and 96 deletions

View file

@ -800,6 +800,16 @@
if (stat_id === 'most_concurrent') {
return
} else if (stat_id === 'top_libraries') {
$('#stats-background-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', art, null, 500, 280, 40, '282828', 3, fallback_art) + ')');
$('#stats-thumb-' + stat_id).removeClass(function (index, className) {
return (className.match (/(^|\s)svg-icon library-\S+/g) || []).join(' ')});
if (thumb.startsWith('http')) {
$('#stats-thumb-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', thumb, null, 300, 300, null, null, null, 'cover') + ')');
} else {
$('#stats-thumb-' + stat_id).css('background-image', '')
.addClass('svg-icon library-' + library_type);
}
} else if (stat_id === 'top_users') {
$('#stats-thumb-' + stat_id).css('background-image', 'url(' + (user_thumb || 'images/gravatar-default.png') + ')');
if (user_id) {
@ -813,16 +823,6 @@
$('#stats-background-' + stat_id).removeClass(function (index, className) {
return (className.match (/(^|\s)platform-\S+/g) || []).join(' ');
}).addClass('platform-' + $(elem).data('platform') + '-rgba');
} else if (stat_id === 'top_libraries') {
$('#stats-background-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', art, null, 500, 280, 40, '282828', 3, fallback_art) + ')');
$('#stats-thumb-' + stat_id).removeClass(function (index, className) {
return (className.match (/(^|\s)svg-icon library-\S+/g) || []).join(' ')});
if (thumb.startsWith('http')) {
$('#stats-thumb-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', thumb, null, 300, 300, null, null, null, 'cover') + ')');
} else {
$('#stats-thumb-' + stat_id).css('background-image', '')
.addClass('svg-icon library-' + library_type);
}
} else {
if (rating_key) {
if (live) {