initial commit

This commit is contained in:
Claudio Maggioni 2018-11-25 12:21:52 +01:00
parent 9d0791eff5
commit e3d5943d3f
9 changed files with 127 additions and 0 deletions

BIN
LDFComicSans.ttf Normal file

Binary file not shown.

BIN
bavota.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
nystrom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
rb.mp3 Executable file

Binary file not shown.

BIN
rb.ogg Executable file

Binary file not shown.

62
simulator.css Normal file
View File

@ -0,0 +1,62 @@
@font-face {
font-family: "LDF Comic Sans";
src: url(./LDFComicSans.ttf);
}
#quote {
position: fixed;
left: 0;
right: 0;
bottom: 0;
text-transform: uppercase;
font-size: 15vh;
font-family: 'LDF Comic Sans', 'Comic Sans MS', sans-serif;
z-index: 3;
}
#quote, #images {
text-align: center;
z-index: 10;
color: white;
margin: 0;
}
#images {
position: fixed;
left: 0;
right: 0;
top: 0;
height: 60vh;
overflow: hidden;
}
#images img {
width: 50vh;
max-width: 30vw;
animation: rotation 1.08s infinite linear;
}
@-webkit-keyframes rotation {
from { transform: rotate(0deg); }
to { transform: rotate(359.99deg); }
}
body {
bacground-color: red;
animation: bg 2.16s infinite linear;
}
@keyframes bg {
0% { background: red; }
10% { background: orange; }
20% { background: yellow; }
30% { background: forestgreen; }
40% { background: darkgreen; }
50% { background: lightgreen; }
60% { background: lightblue; }
70% { background: turquoise; }
80% { background: blue; }
90% { background: purple; }
100% { background: red; }
}

28
simulator.html Executable file
View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8"/>
<meta http-equiv="refresh" content="30; https://www.youtube.com/watch?v=dQw4w9WgXcQ">
<title id="title">USI Simulator</title>
<link rel="stylesheet" href="./simulator.css"/>
</head>
<body>
<audio id="audio" autoplay loop>
<script>
if(navigator.userAgent.match("OPR"))
document.write("<source src=\"./rb.ogg\" type=\"audio/ogg\">");
else document.write("<source src=\"./rb.mp3\" type=\"audio/mpeg\">");
</script>
</audio>
<h1 id="quote">MALUSA</h1>
<div id="images">
<img id="img1" style="display: none"/>
<img id="img2" style="display: none"/>
<img id="img3" style="display: none"/>
</div>
<script src="./simulator.js"></script>
</body>
</html>

37
simulator.js Normal file
View File

@ -0,0 +1,37 @@
var looper;
var images = ["bavota.png", "nystrom.png", "langhhhhhhhhheeeeinrichhhhhh.png"];
var quotes = ["PIPISTRELLO","VATTELAPESCA","SAMPDORIA","DEPRECATO","QRM","JOOMLA","8086","ETHERNET","COLLISIONE","XEROX","DIGITAL","IBM",
"CHARAT","FIELDSET","TABINDEX","TD","HTML","FUNCTION","STYLE : TD","UNDERLINE","&lt;HEAD&gt;","&lt;BODY&gt;","PREAMBOLO","FISCHIO",
"CAVO COASSIALE","FIRST COME FIRST SERVED","BUSTA","STAZIONE","QUI QUO QUA","FIFO","255.255.255.0","ALICE","...NEL PAESE DELLE MERAVIGLIE",
"LEA DX 9","GETELEMENTBYID","FAI UN SALTO","ISO OSI","DISPATCHER","SCHEDULER","BOLLINO BLU","PACCHETTO","XHTML","&lt;b&gt; e &lt;i&gt;",
"CHIODI","QUESITO","OLIVETTI","REQUEST","TOKEN RING","INT 21H","IFRAME","GIOCHINO","BATTAGLIA NAVALE","MELA","SNAKE CON IL SERPENTE CHE NON SI ALLUNGA",
"SCHEDULER","STATO DI PRONTO","PHP","FORM ACTION="];
document.addEventListener("DOMContentLoaded", setup);
function setup() {
changeImages();
window.setInterval(changeImages, 15 * (360 / 5));
changeQuotes(150, 10);
document.getElementById("img1").removeAttribute("style");
document.getElementById("img2").removeAttribute("style");
document.getElementById("img3").removeAttribute("style");
}
var imageOffset = 0;
function changeImages() {
for (var i = 1; i < 4; i++)
document.getElementById("img" + i).src = images[(i+imageOffset) % 3];
imageOffset++;
}
function changeQuotes(time, offset) {
var quote = Math.floor(Math.random() * quotes.length);
document.getElementById("quote").innerHTML =
document.getElementById("title").innerHTML =
quotes[quote];
window.setTimeout(function() {
changeQuotes(time, offset);
}, offset + time * Math.sqrt(quotes[quote].length));
}