76 lines
2.0 KiB
HTML
76 lines
2.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<link rel="icon" type="image/x-icon" href="/static/images/pvv_logo.png">
|
|
<title>ASCII</title>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
background: black;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
color: white;
|
|
height: 100vh;
|
|
}
|
|
|
|
pre {
|
|
white-space: pre;
|
|
font-family: monospace;
|
|
font-size: 14px;
|
|
line-height: 1.2;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<pre id="ascii">
|
|
a@@@@a
|
|
a@@@@@@@@@@@@a
|
|
a@@@@@@by@@@@@@@@a
|
|
a@@@@@S@C@E@S@W@@@@@@a
|
|
@@@@@@@@@@@@@@@@@@@@@@
|
|
`@@@@@@`\\//'@@@@@@'
|
|
,, || ,, S.C.E.S.W.
|
|
/(-\ || /.)m
|
|
,---' /`-'||`-'\ `----,
|
|
/( )__)) || ((,==( )\
|
|
_ /_//___\\ __|| ___\\ __\\ ____
|
|
`` `` /MM\ '' ''
|
|
</pre>
|
|
<script>
|
|
fetch("/files")
|
|
.then(res => res.json())
|
|
.then(files => {
|
|
const AsciiObj = files.AsciiFiles
|
|
|
|
let index = 0;
|
|
const preElement = document.getElementById("ascii");
|
|
|
|
const nextAscii = () => {
|
|
const filePath = AsciiObj[index].Name;
|
|
fetch(filePath)
|
|
.then(res => {return res.text();})
|
|
.then(fileContent => {preElement.textContent = fileContent;})
|
|
.catch(err => {
|
|
console.error("PANIC FETCH .txt FAILED PANIC!!")
|
|
preElement.textContent = fileContent;
|
|
})
|
|
index = (index + 1) % AsciiObj.length;
|
|
}
|
|
|
|
nextAscii();
|
|
setInterval(nextAscii, 1000);
|
|
}).catch(err => {
|
|
console.error("PANIC FETCH of file list FAILED!", err);
|
|
preElement.textContent = "Error loading file list.";
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|