<style>
body,
html {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
overflow: hidden;
background-color: #00FF94;
display: flex;
justify-content: center;
align-items: center
}
.svg-iframe-container {
position: relative;
width: 90vmin;
height: 90vmin;
margin: auto;
opacity: 0;
transform: scale(1.1);
transition: opacity 1s ease-in-out, transform 5s ease-in-out
}
.iframe-container,
.responsive-svg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 20
}
iframe {
width: 100%;
height: 100%;
border: none;
opacity: 0.05;
}
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #000;
z-index: 1000;
transition: opacity 5s ease-in-out
}
</style>
<script src=/content/f91dc196c468614f12171a3adbc504a2b36cd69fa15fb2009835f51cabb799dfi0 await></script>
<div class=iframe-container>
<iframe id=iframe-content src=/content/5be0e886460da14c4b93001c26477d3ed2d690cf1a03d91d374069a49e3f2297i0 onload=iframeLoaded()></iframe>
</div>
<div class=svg-iframe-container id=svg-iframe-container>
<div id=svg-container></div>
</div>
<div class=overlay id=overlay></div>
<script>
function iframeLoaded() {
const t = document.getElementById("svg-iframe-container"),
e = document.getElementById("overlay");
t.style.opacity = 1;
t.style.transform = "scale(1)";
e.style.opacity = .01;
setTimeout((() => e.remove()), 5000);
const o = new SVGColorChanger("svg-container");
o.createSVG();
let n = "#202020",
a = "#008F8F";
const h = o.changeColors({
"path:nth-of-type(1)": "#37B7E0",
"path:nth-of-type(2)": n,
"path:nth-of-type(3)": a,
"path:nth-of-type(4)": n,
"path:nth-of-type(5)": a,
"path:nth-of-type(6)": a,
"path:nth-of-type(7)": a,
"path:nth-of-type(8)": a,
"path:nth-of-type(9)": n,
"path:nth-of-type(10)": a,
"path:nth-of-type(11)": "#00FF94",
"path:nth-of-type(12)": "#37B7E0",
"path:nth-of-type(13)": n
});
console.log("Colors used:", h);
}
let colorState = false,
lastFrameTime = 0;
function switchColor(t) {
if (!lastFrameTime || t - lastFrameTime >= 35) {
document.body.style.backgroundColor = colorState ? "#00FF94" : "#00e585";
colorState = !colorState;
lastFrameTime = t;
}
requestAnimationFrame(switchColor);
}
document.addEventListener("DOMContentLoaded", () => {
requestAnimationFrame(switchColor);
});
</script>
No replies yet