|
|
@ -11,7 +11,7 @@ function boxShadows(max) { |
|
|
|
let ret = []; |
|
|
|
for (let i = 0; i < max; ++i) { |
|
|
|
ret.push(` |
|
|
|
${ rn(1, 100) }vw ${ rn(1, 100) }vh ${ rn(20, 60) }vmin ${ rn(10, 30) }vmin |
|
|
|
${ rn(1, 110) }vw ${ rn(1, 110) }vh ${ rn(20, 30) }vmin ${ rn(10, 60) }vmin |
|
|
|
${ rs('#F52D75', '#CCBD4F', '#32497F', '#EB4377') } |
|
|
|
`)
|
|
|
|
} |
|
|
@ -21,7 +21,12 @@ function boxShadows(max) { |
|
|
|
const cloud = document.querySelector('#cloud'); |
|
|
|
|
|
|
|
function update() { |
|
|
|
cloud.style.boxShadow = boxShadows(30); |
|
|
|
if (window.screen.availWidth > 400 && window.screen.availHeight > 400 ) { |
|
|
|
cloud.style.boxShadow = boxShadows(15); |
|
|
|
} |
|
|
|
else { |
|
|
|
document.body.style.backgroundImage = "linear-gradient(to bottom right, white, #F52D75)"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
window.addEventListener('load', update); |
|
|
|