<!DOCTYPE html>
<html>
<head>
<style>
*{
margin:0;
padding:0;
box-sizing:border-box;
overflow:hidden;
}
body {
background:#000;
}
.bg-image {
width: 100vw;
height: 100vh;
background-size: cover;
background-position: center;
opacity: 0;
transition: opacity 1s ease-in;
}
#progress {
margin: 0 auto;
width: 100%;
height: 5px;
position: relative;
background-color: #000;
}
#bar {
background-color: yellow;
width: 10px;
height: 5px;
position: absolute;
}
/* responsive styles */
@media only screen and (max-width: 600px) {
.bg-image {
height:auto;
width:100%;
}
}
#music {display:none!important}
</style>
</head>
<body>
<div class="bg-image"></div>
<script>
// JavaScript code here
// function to generate random image name
function getRandomImageName() {
var randomNumber = Math.floor(Math.random() * 72) + 1;
var imageName = randomNumber.toString().padStart(3, "0");
return "https://i0.wp.com/www.raducobra.com/img/image_" + imageName + ".jpg";
}
var bgImage = document.querySelector(".bg-image");
var image = new Image();
function changeBackground() {
bgImage.style.opacity = 0;
image.src = getRandomImageName();
image.onload = function() {
showBackgroundImage();
}
}
function showBackgroundImage() {
bgImage.style.backgroundImage = `url(${image.src})`;
bgImage.style.opacity = 1;
setTimeout(changeBackground, 10000);
resetToDefaults()
}
window.onload = function() {
setTimeout(changeBackground, 100);
}
</script>
<script src="topbar.js"></script>
<script>
function resetToDefaults() {
topbar.config({
autoRun : true,
barThickness : 5,
barColors : {
'0' : 'rgba(26, 188, 156, .9)',
'.25' : 'rgba(52, 152, 219, .9)',
'.50' : 'rgba(241, 196, 15, .9)',
'.75' : 'rgba(230, 126, 34, .9)',
'1.0' : 'rgba(211, 84, 0, .9)'
},
shadowBlur : 10,
shadowColor : 'rgba(0, 0, 0, .6)'
})
topbar.show()
setTimeout(function() {
topbar.hide()
}, 2000)
}
</script>
</body>
</html>