pub.solar/scripts/background.js

14 lines
414 B
JavaScript
Raw Normal View History

2022-10-02 19:38:38 +00:00
(() => {
const background = document.getElementById("background");
const logo = document.getElementById("logo").cloneNode(true);
logo.id = "";
2022-10-03 02:47:39 +00:00
const generateBackground = () => (new Array(Math.ceil(window.innerWidth / 100) * Math.ceil(window.innerHeight / 100)))
2022-10-02 19:38:38 +00:00
.fill(null)
.map(_ => logo.cloneNode(true))
.forEach(l => {
background.appendChild(l);
});
2022-10-03 02:47:39 +00:00
generateBackground();
2022-10-02 19:38:38 +00:00
})();