-
Notifications
You must be signed in to change notification settings - Fork 17
/
marquee.html
41 lines (41 loc) · 6.45 KB
/
marquee.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
html, body { height: 100%; } body { display: flex; flex-direction: column; justify-content: center; } marquee { font-size: 4vh; font-family: monospace; }
</style>
</head>
<body>
<script>
// Font from: https://github.com/dhepper/font8x8/blob/master/font8x8_basic.h
var font = [[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],[0x18,0x3C,0x3C,0x18,0x18,0x00,0x18,0x00],[0x36,0x36,0x00,0x00,0x00,0x00,0x00,0x00],[0x36,0x36,0x7F,0x36,0x7F,0x36,0x36,0x00],[0x0C,0x3E,0x03,0x1E,0x30,0x1F,0x0C,0x00],[0x00,0x63,0x33,0x18,0x0C,0x66,0x63,0x00],[0x1C,0x36,0x1C,0x6E,0x3B,0x33,0x6E,0x00],[0x06,0x06,0x03,0x00,0x00,0x00,0x00,0x00],[0x18,0x0C,0x06,0x06,0x06,0x0C,0x18,0x00],[0x06,0x0C,0x18,0x18,0x18,0x0C,0x06,0x00],[0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00],[0x00,0x0C,0x0C,0x3F,0x0C,0x0C,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x06],[0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x00],[0x60,0x30,0x18,0x0C,0x06,0x03,0x01,0x00],[0x3E,0x63,0x73,0x7B,0x6F,0x67,0x3E,0x00],[0x0C,0x0E,0x0C,0x0C,0x0C,0x0C,0x3F,0x00],[0x1E,0x33,0x30,0x1C,0x06,0x33,0x3F,0x00],[0x1E,0x33,0x30,0x1C,0x30,0x33,0x1E,0x00],[0x38,0x3C,0x36,0x33,0x7F,0x30,0x78,0x00],[0x3F,0x03,0x1F,0x30,0x30,0x33,0x1E,0x00],[0x1C,0x06,0x03,0x1F,0x33,0x33,0x1E,0x00],[0x3F,0x33,0x30,0x18,0x0C,0x0C,0x0C,0x00],[0x1E,0x33,0x33,0x1E,0x33,0x33,0x1E,0x00],[0x1E,0x33,0x33,0x3E,0x30,0x18,0x0E,0x00],[0x00,0x0C,0x0C,0x00,0x00,0x0C,0x0C,0x00],[0x00,0x0C,0x0C,0x00,0x00,0x0C,0x0C,0x06],[0x18,0x0C,0x06,0x03,0x06,0x0C,0x18,0x00],[0x00,0x00,0x3F,0x00,0x00,0x3F,0x00,0x00],[0x06,0x0C,0x18,0x30,0x18,0x0C,0x06,0x00],[0x1E,0x33,0x30,0x18,0x0C,0x00,0x0C,0x00],[0x3E,0x63,0x7B,0x7B,0x7B,0x03,0x1E,0x00],[0x0C,0x1E,0x33,0x33,0x3F,0x33,0x33,0x00],[0x3F,0x66,0x66,0x3E,0x66,0x66,0x3F,0x00],[0x3C,0x66,0x03,0x03,0x03,0x66,0x3C,0x00],[0x1F,0x36,0x66,0x66,0x66,0x36,0x1F,0x00],[0x7F,0x46,0x16,0x1E,0x16,0x46,0x7F,0x00],[0x7F,0x46,0x16,0x1E,0x16,0x06,0x0F,0x00],[0x3C,0x66,0x03,0x03,0x73,0x66,0x7C,0x00],[0x33,0x33,0x33,0x3F,0x33,0x33,0x33,0x00],[0x1E,0x0C,0x0C,0x0C,0x0C,0x0C,0x1E,0x00],[0x78,0x30,0x30,0x30,0x33,0x33,0x1E,0x00],[0x67,0x66,0x36,0x1E,0x36,0x66,0x67,0x00],[0x0F,0x06,0x06,0x06,0x46,0x66,0x7F,0x00],[0x63,0x77,0x7F,0x7F,0x6B,0x63,0x63,0x00],[0x63,0x67,0x6F,0x7B,0x73,0x63,0x63,0x00],[0x1C,0x36,0x63,0x63,0x63,0x36,0x1C,0x00],[0x3F,0x66,0x66,0x3E,0x06,0x06,0x0F,0x00],[0x1E,0x33,0x33,0x33,0x3B,0x1E,0x38,0x00],[0x3F,0x66,0x66,0x3E,0x36,0x66,0x67,0x00],[0x1E,0x33,0x07,0x0E,0x38,0x33,0x1E,0x00],[0x3F,0x2D,0x0C,0x0C,0x0C,0x0C,0x1E,0x00],[0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x00],[0x33,0x33,0x33,0x33,0x33,0x1E,0x0C,0x00],[0x63,0x63,0x63,0x6B,0x7F,0x77,0x63,0x00],[0x63,0x63,0x36,0x1C,0x1C,0x36,0x63,0x00],[0x33,0x33,0x33,0x1E,0x0C,0x0C,0x1E,0x00],[0x7F,0x63,0x31,0x18,0x4C,0x66,0x7F,0x00],[0x1E,0x06,0x06,0x06,0x06,0x06,0x1E,0x00],[0x03,0x06,0x0C,0x18,0x30,0x60,0x40,0x00],[0x1E,0x18,0x18,0x18,0x18,0x18,0x1E,0x00],[0x08,0x1C,0x36,0x63,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF],[0x0C,0x0C,0x18,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x1E,0x30,0x3E,0x33,0x6E,0x00],[0x07,0x06,0x06,0x3E,0x66,0x66,0x3B,0x00],[0x00,0x00,0x1E,0x33,0x03,0x33,0x1E,0x00],[0x38,0x30,0x30,0x3e,0x33,0x33,0x6E,0x00],[0x00,0x00,0x1E,0x33,0x3f,0x03,0x1E,0x00],[0x1C,0x36,0x06,0x0f,0x06,0x06,0x0F,0x00],[0x00,0x00,0x6E,0x33,0x33,0x3E,0x30,0x1F],[0x07,0x06,0x36,0x6E,0x66,0x66,0x67,0x00],[0x0C,0x00,0x0E,0x0C,0x0C,0x0C,0x1E,0x00],[0x30,0x00,0x30,0x30,0x30,0x33,0x33,0x1E],[0x07,0x06,0x66,0x36,0x1E,0x36,0x67,0x00],[0x0E,0x0C,0x0C,0x0C,0x0C,0x0C,0x1E,0x00],[0x00,0x00,0x33,0x7F,0x7F,0x6B,0x63,0x00],[0x00,0x00,0x1F,0x33,0x33,0x33,0x33,0x00],[0x00,0x00,0x1E,0x33,0x33,0x33,0x1E,0x00],[0x00,0x00,0x3B,0x66,0x66,0x3E,0x06,0x0F],[0x00,0x00,0x6E,0x33,0x33,0x3E,0x30,0x78],[0x00,0x00,0x3B,0x6E,0x66,0x06,0x0F,0x00],[0x00,0x00,0x3E,0x03,0x1E,0x30,0x1F,0x00],[0x08,0x0C,0x3E,0x0C,0x0C,0x2C,0x18,0x00],[0x00,0x00,0x33,0x33,0x33,0x33,0x6E,0x00],[0x00,0x00,0x33,0x33,0x33,0x1E,0x0C,0x00],[0x00,0x00,0x63,0x6B,0x7F,0x7F,0x36,0x00],[0x00,0x00,0x63,0x36,0x1C,0x36,0x63,0x00],[0x00,0x00,0x33,0x33,0x33,0x3E,0x30,0x1F],[0x00,0x00,0x3F,0x19,0x0C,0x26,0x3F,0x00],[0x38,0x0C,0x0C,0x07,0x0C,0x0C,0x38,0x00],[0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x00],[0x07,0x0C,0x0C,0x38,0x0C,0x0C,0x07,0x00],[0x6E,0x3B,0x00,0x00,0x00,0x00,0x00,0x00],[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]];
var s = unescape(window.location.search.substr(1));
if (s == "") {
s = 'Happy international "><marquee> day!';
}
var grid = [...new Array(8)].map(_ => [])
for (var i=0; i<s.length; i++) {
var c = font[s.charCodeAt(i)];
for (var x=0; x<8; x++) {
for (var y=0; y<8; y++) {
grid[y][i * 10 + x] = ((c[y] >> x) & 1) ? "█" : " ";
}
}
for (var x=8; x<10; x++) {
for (var y=0; y<8; y++) {
grid[y][i * 10 + x] = " ";
}
}
}
for (var i=0; i<8; i++) {
var d = document.createElement('marquee');
d.setAttribute('scrollamount', '15');
d.innerHTML = grid[i].join('');
document.body.appendChild(d);
}
// click to go fullscreen
document.body.onclick = () => document.documentElement.requestFullscreen();
</script>
</body>
</html>