mirror of
https://gitlab.com/SpaccInc/SpaccDotWeb.git
synced 2025-06-05 21:29:12 +02:00
[Server] Handle linkClientScripts, polish static HTML gen with embedded files
This commit is contained in:
17
Example.Server/particles.js
Normal file
17
Example.Server/particles.js
Normal file
@ -0,0 +1,17 @@
|
||||
window.addEventListener('load', function(){
|
||||
for (var i=0; i<(window.innerWidth * window.innerHeight / 6000); i++) (function(){
|
||||
var v = (Math.random() * window.innerHeight), h = (100 * Math.random());
|
||||
var n = document.createElement('span');
|
||||
n.textContent = '✨️';
|
||||
n.style.position = 'absolute';
|
||||
document.body.appendChild(n);
|
||||
var e = setInterval(function(){
|
||||
var r = Math.random();
|
||||
n.style.top = (v += 1).toString() + 'px';
|
||||
n.style.left = (h += (r > 0.7 ? r/5 : -r/5)).toString() + '%';
|
||||
if (v > window.innerHeight) v = -16;
|
||||
if (h > 100) h = -2;
|
||||
else if (h < -2) h = 100;
|
||||
}, 20);
|
||||
})();
|
||||
});
|
Reference in New Issue
Block a user