Archived
1
0

」 feat: Added static website

This commit is contained in:
2025-02-22 16:56:23 +01:00
parent 05d2f7a981
commit b3dc6ebb98
81 changed files with 120 additions and 3 deletions

View File

@ -0,0 +1,24 @@
function init()
{
var img = document.querySelector("#kanel");
const random = Math.floor(Math.random() * 70) + 1;
img.src = 'img/'+random+'.jpg';
const { naturalWidth, naturalHeight } = img;
const isLandscape = naturalWidth / naturalHeight > 1;
if (isLandscape) {
img.style.width = window.innerWidth+'px';
img.style.height = 'auto';
} else {
img.style.height = window.innerHeight+'px';
img.style.width = 'auto';
}
if (img.src == 'img/70.jpg')
{
img.style.height = 'auto';
img.style.width = '100%';
}
}
init();