!DOCTYPE html
html lang=en
head
meta charset=UTF-8
titleServer Processing...title
style
body{
margin0;
background#000;
font-family Consolas, monospace;
color#00ff9c;
}
.terminal{
padding25px;
font-size16px;
line-height1.6;
white-spacepre-wrap;
}
.cursor{
displayinline-block;
width10px;
background#00ff9c;
margin-left5px;
animation blink 1s infinite;
}
@keyframes blink{
0%{opacity0}
50%{opacity1}
100%{opacity0}
}
style
head
body
div class=terminal id=terminaldiv
script
const lines = [
[BOOT] Initializing secure environment...,
[OK] Loading system modules...,
[OK] Connecting to main server...,
[OK] Establishing encrypted channel...,
[INFO] Checking server resources...,
[INFO] Allocating memory...,
[INFO] Starting background workers...,
[INFO] Processing request...,
[INFO] Running verification checks...,
[INFO] Syncing data packets...,
[INFO] Waiting for server response...,
[INFO] Processing still running...,
[INFO] Please do not close this window...
];
let term = document.getElementById(terminal);
let i = 0;
function typeLine(){
if(i lines.length){
let line = document.createElement(div);
term.appendChild(line);
let text = lines[i];
let charIndex = 0;
let typer = setInterval(()={
line.textContent += text.charAt(charIndex);
charIndex++;
if(charIndex = text.length){
clearInterval(typer);
i++;
setTimeout(typeLine, 500);
}
}, 25);
} else {
loopMessages();
}
}
function loopMessages(){
const msgs = [
[INFO] Server still processing...,
[INFO] Optimizing data...,
[INFO] Finalizing tasks...,
[INFO] Processing...
];
setInterval(()={
let line = document.createElement(div);
line.textContent = msgs[Math.floor(Math.random()msgs.length)];
term.appendChild(line);
window.scrollTo(0,document.body.scrollHeight);
}, 2000);
}
typeLine();
script
body
html