-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
92 lines (83 loc) · 3.5 KB
/
index.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>
<html>
<head>
<title>Until Doomsday</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script src="https://ajax.aspnetcdn.com/ajax/knockout/knockout-2.2.1.js"></script>
<script src="sevenSeg.js"></script>
</head>
<body>
<canvas id="c"></canvas>
<div class="container">
<div style="padding: 20px; background-color: black; border-style: inset; border-width: 5px; margin-top: 30px;">
<div id="exampleArray" ></div>
</div>
</div>
</body>
<script>
$("#exampleArray").sevenSeg({ digits: 10, value: 0000000000});
var c = document.getElementById("c");
var ctx = c.getContext("2d");
c.height = window.innerHeight;
c.width = window.innerWidth;
var matrix = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789@#$%^&*()*&^%+-/~{[|`]}";
matrix = matrix.split("");
var font_size = 10;
var columns = c.width/font_size;
var drops = [];
for(var x = 0; x < columns; x++)
drops[x] = 1;
function draw()
{
ctx.fillStyle = "rgba(0, 0, 0, 0.04)";
ctx.fillRect(0, 0, c.width, c.height);
ctx.fillStyle = "#00ff00";//green text
ctx.font = font_size + "px arial";
for(var i = 0; i < drops.length; i++)
{
var text = matrix[Math.floor(Math.random()*matrix.length)];
ctx.fillText(text, i*font_size, drops[i]*font_size);
if(drops[i]*font_size > c.height && Math.random() > 0.975)
drops[i] = 0;
drops[i]++;
}
}
setInterval(draw, 35);
$("#exampleArray").sevenSeg({ digits: 10, value: 8888888888});
var countDownDate = new Date("Jan 7, 2040 12:00:00").getTime();
var x = setInterval(function() {
var now = new Date().getTime();
var distance = countDownDate - now;
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
if(minutes<10){minutes = "0" + minutes}
if(seconds<10){seconds = "0" + seconds}
if(hours<10){hours = "0" + hours}
var data = days + "x" + hours + "x" + minutes + "x"+ seconds;
$("#exampleArray").sevenSeg({ digits: 11, value: data});
if (distance < 0) {
$("#exampleArray").sevenSeg({ digits: 10, value: 'xxHAcqEdxx'});
}
}, 1000);
</script>
<style>
*{
margin: 0;
padding: 0;
}
body {background: black;}
canvas {display:block;
position:absolute;
left:0;
top:0;
z-index:-1;}
</style>
</html>