Archived
1
0

」 feat: Added static website

This commit is contained in:
2025-02-22 17:11:06 +01:00
parent 05d2f7a981
commit 1004dba659
11 changed files with 120 additions and 3 deletions

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kanel Supremacy</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="image-container">
<img id="kanel" src="#">
</div>
<script type="text/javascript" src="script.js"></script>
</body>
</html>

View File

@ -0,0 +1,24 @@
function init()
{
var img = document.querySelector("#kanel");
const random = Math.floor(Math.random() * 70) + 1;
img.src = 'https://kanel.ovh/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 == 'https://kanel.ovh/img/70.jpg')
{
img.style.height = 'auto';
img.style.width = '100%';
}
}
init();

View File

@ -0,0 +1,28 @@
body, html
{
margin: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
background-color: #f0f0f0;
overflow: hidden;
box-sizing: border-box;
}
.image-container
{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
position: relative;
}
.img
{
width: 100%;
height: auto;
}