diff --git a/res/include/script/file_viewer/Viewer.js b/res/include/script/file_viewer/Viewer.js index 070e5f0..e69eb6e 100644 --- a/res/include/script/file_viewer/Viewer.js +++ b/res/include/script/file_viewer/Viewer.js @@ -133,21 +133,21 @@ Viewer.prototype.setFile = function(file) { } Viewer.prototype.renderSponsorsSimple = function() { - let scale = 1 - let scaleWidth = 1 - let scaleHeight = 1 - let minWidth = 768 - let minHeight = 1000 + let scaleWidth = 1 + let scaleHeight = 1 + let minWindowHeight = 1000 + let bannerWidth = 720 + let bannerHeight = 120 - if (window.innerWidth < minWidth) { - scaleWidth = window.innerWidth/minWidth + if (window.innerWidth < bannerWidth) { + scaleWidth = window.innerWidth/bannerWidth } - if (window.innerHeight < minHeight) { - scaleHeight = window.innerHeight/minHeight + if (window.innerHeight < minWindowHeight) { + scaleHeight = window.innerHeight/minWindowHeight } - scale = scaleWidth < scaleHeight ? scaleWidth : scaleHeight - - document.querySelector(".sponsors").style.height = (scale*128)+"px" + + let scale = scaleWidth < scaleHeight ? scaleWidth : scaleHeight + document.querySelector(".sponsors").style.height = (scale*bannerHeight)+"px" } // Viewer.prototype.renderSponsors = function() { diff --git a/res/static/img/misc/banner_as.png b/res/static/img/misc/banner_as.png index 1c77516..53ca182 100644 Binary files a/res/static/img/misc/banner_as.png and b/res/static/img/misc/banner_as.png differ diff --git a/res/template/file_viewer.html b/res/template/file_viewer.html index b56d91b..b7e7c28 100644 --- a/res/template/file_viewer.html +++ b/res/template/file_viewer.html @@ -100,7 +100,7 @@