update banner ad
This commit is contained in:
@@ -133,21 +133,21 @@ Viewer.prototype.setFile = function(file) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Viewer.prototype.renderSponsorsSimple = function() {
|
Viewer.prototype.renderSponsorsSimple = function() {
|
||||||
let scale = 1
|
let scaleWidth = 1
|
||||||
let scaleWidth = 1
|
let scaleHeight = 1
|
||||||
let scaleHeight = 1
|
let minWindowHeight = 1000
|
||||||
let minWidth = 768
|
let bannerWidth = 720
|
||||||
let minHeight = 1000
|
let bannerHeight = 120
|
||||||
|
|
||||||
if (window.innerWidth < minWidth) {
|
if (window.innerWidth < bannerWidth) {
|
||||||
scaleWidth = window.innerWidth/minWidth
|
scaleWidth = window.innerWidth/bannerWidth
|
||||||
}
|
}
|
||||||
if (window.innerHeight < minHeight) {
|
if (window.innerHeight < minWindowHeight) {
|
||||||
scaleHeight = window.innerHeight/minHeight
|
scaleHeight = window.innerHeight/minWindowHeight
|
||||||
}
|
}
|
||||||
scale = scaleWidth < scaleHeight ? scaleWidth : scaleHeight
|
|
||||||
|
let scale = scaleWidth < scaleHeight ? scaleWidth : scaleHeight
|
||||||
document.querySelector(".sponsors").style.height = (scale*128)+"px"
|
document.querySelector(".sponsors").style.height = (scale*bannerHeight)+"px"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Viewer.prototype.renderSponsors = function() {
|
// Viewer.prototype.renderSponsors = function() {
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 193 KiB After Width: | Height: | Size: 79 KiB |
@@ -100,7 +100,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="sponsors" class="sponsors">
|
<div id="sponsors" class="sponsors">
|
||||||
<a href="/click/DtZ3hHT9?target=https%3A%2F%2Fwww.amarulasolutions.com%2Fnews%2Fembedded-world-2020%2F">
|
<a href="/click/DtZ3hHT9?target=https%3A%2F%2Fwww.amarulasolutions.com">
|
||||||
<img src="/res/img/misc/banner_as.png" style="display: block; margin: auto; height: 100%;" />
|
<img src="/res/img/misc/banner_as.png" style="display: block; margin: auto; height: 100%;" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user