interesting.rocks/index.html
2025-05-12 17:33:15 +12:00

146 lines
4.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>interesting.rocks</title>
<link rel="icon" href="./favicon.ico" type="image/x-icon">
<script src="jquery-3.7.1.slim.min.js"></script>
<style>
body {
margin: 0;
padding: 0;
font-family: 'Comic Sans MS', cursive, sans-serif;
}
main {
width: 500px;
margin: 25px auto;
text-align: center;
}
h1 {
margin: 0 0 50px 0;
}
img {
margin-top: 5px;
}
.rockcontainer {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.rockrow {
width: 1000px;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
}
@keyframes rotation {
from {
transform: rotate(0deg);
}
to {
transform: rotate(359deg);
}
}
</style>
</head>
<body>
<main>
<h1>interesting.rocks</h1>
<div class="rockcontainer">
<div class="rockrow">
<img src="rock1.png" alt="rock" class="rotate zoomies" width="474" height="316">
<img src="rock2.png" alt="rock" class="rotate zoomies" width="474" height="369">
</div>
<div class="rockrow">
<img src="rock3.png" alt="rock" class="rotate zoomies" width="576" height="433">
<img src="rock4.png" alt="rock" class="rotate zoomies" width="577" height="433">
</div>
</div>
</main>
<script>
let w = 32;
let x = 10;
let y = 0;
let z = 1;
let colours = ['grey', 'red', 'blue', 'green', 'yellow', 'purple', 'orange', 'pink'];
let boop;
let boopBg;
function h1Boop() {
if (z >= colours.length) {
z = 0;
}
$('h1').css('color', colours[z]);
z++;
}
function bgBoop() {
if (y >= colours.length) {
y = 0;
}
$('body').css('background-color', colours[y]);
y++;
}
function setSpeed() {
x = x/2;
if (x < 0.5) {
clearInterval(boop);
$('.rockcontainer').css('animation', 'rotation 5s infinite linear');
$('.rotate').each(function(index , element) {
$(element).css('animation', 'rotation 5s infinite linear');
});
setTimeout(function() {
boopBg = setInterval(bgBoop, 500);
setTimeout(function() {
setInterval(h1Boop, 250);
}, 2500);
}, 2000);
return
}
$('.rotate').each(function(index , element) {
$(element).css('animation', 'rotation ' + x + 's infinite linear');
});
}
$(function() {
boop = setInterval(setSpeed, 2000);
setTimeout(function() {
setInterval(function() {
$('.rotate').each(function(index , element) {
w = w+1;
$('h1').css('font-size', w);
});
}, 1000);
}, 1000);
setTimeout(function() {
setInterval(function() {
$('.rotate').each(function(index , element) {
$(element).width($(element).width() + 5);
$(element).height($(element).height() + 5);
});
}, 200);
}, 10000);
$('.body').css('background-color', 'grey');
});
</script>
</body>
</html>