mirror of
https://gitlab.com/SpaccInc/SpaccDotWeb.git
synced 2025-06-05 21:29:12 +02:00
[Alt] Add new methods; [Server] Slight improvements to example; [Build] Add full HTML build
This commit is contained in:
@ -21,3 +21,17 @@ div#transition {
|
||||
cursor: progress;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.particles {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.particles > * {
|
||||
position: absolute;
|
||||
}
|
||||
|
5
Example.Server/index.js
Executable file → Normal file
5
Example.Server/index.js
Executable file → Normal file
@ -14,7 +14,10 @@ const server = SpaccDotWebServer.setup({
|
||||
});
|
||||
|
||||
if (SpaccDotWebServer.envIsNode && ['dump', 'html', 'writeStaticHtml'].includes(process.argv[2])) {
|
||||
const fileName = server.writeStaticHtml(Number(process.argv[3] || 0));
|
||||
const fileName = server.writeStaticHtml({
|
||||
selfContained: Number(process.argv[3] || 0),
|
||||
htmlFilePath: process.argv[4],
|
||||
});
|
||||
console.log(`Dumped Static HTML to '${fileName}'!`);
|
||||
} else {
|
||||
const serverData = server.initServer({
|
||||
|
@ -1,10 +1,11 @@
|
||||
window.addEventListener('load', function(){
|
||||
var c = Object.assign(document.createElement('div'), { className: "particles" });
|
||||
document.body.appendChild(c);
|
||||
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);
|
||||
c.appendChild(n);
|
||||
var e = setInterval(function(){
|
||||
var r = Math.random();
|
||||
n.style.top = (v += 1).toString() + 'px';
|
||||
|
Reference in New Issue
Block a user