This is a reusable plain version the varia library website. You can host your own website of books using just a simple csv file
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
620 B

function rn(from, to) {
return ~~(Math.random() * (to - from + 1)) + from;
}
function rs() {
return arguments[rn(1, arguments.length) - 1];
}
function boxShadows(max) {
let ret = [];
for (let i = 0; i < max; ++i) {
ret.push(`
${ rn(1, 100) }vw ${ rn(1, 100) }vh ${ rn(20, 40) }vmin ${ rn(1, 20) }vmin
${ rs('#F52D75', '#CCBD4F', '#32497F', '#EB4377') }
`)
}
return ret.join(',');
}
const cloud = document.querySelector('#cloud');
function update() {
cloud.style.boxShadow = boxShadows(120);
}
window.addEventListener('load', update);
document.addEventListener('click', update);