-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
109 lines (92 loc) · 3.15 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="shortcut icon" href="images/kit.jpg" />
<title>Knight Rider Circuit</title>
<style>
div#mainqueue aside {
width: 80px;
height: 40px;
background-color: black;
margin: 5px;
display: inline-block;
border-radius: 5px;
transition: 0.1s;
}
</style>
</head>
<body style="background-color: black;">
<div id="mainqueue" style="text-align: center;height: 200px;max-width: 750px;position: absolute;top: 0;bottom: 0;left: 0;right: 0;margin: auto;">
<br>
<br>
<br>
<br>
<br>
<br>
<audio src="audios/Knight%20Rider%20Scanner.mp3" controls loop autoplay style="display: none"></audio>
<hr>
<div id="lights" style="min-width: 750px; display: inline-block; text-align: left;">
<aside></aside>
<aside></aside>
<aside></aside>
<aside></aside>
<aside></aside>
<aside></aside>
<aside></aside>
<aside></aside>
</div>
<hr>
</div>
<script type="application/javascript" src="js/jquery-3.3.1.min.js"></script>
<script type="application/javascript" src="js/bootstrap.min.js"></script>
<script>
var leftside = ['rgba(255,0,0,0.4)', 'rgba(255,0,0,0.7)', 'rgba(255,0,0,1)', 'black', 'black', 'black', 'black', 'black', 'black', 'black', 'black'];
function Rightstart() {
var a = 0;
function setColorsRight() {
for (var j = 2; j < 10; j++) {
$('div#lights aside:nth-child(' + (j - 1) + ')').css('background-color', leftside[j]);
}
}
startcolors();
function startcolors() {
if (a++ <= 10) {
setColorsRight();
var lastCol = leftside.pop();
leftside.unshift(lastCol);
setTimeout(startcolors, 100);
}
if (a == 12) {
Leftstart();
}
}
}
var rightside = ['black', 'black', 'black', 'black', 'black', 'black', 'black', 'black', 'rgba(255,0,0,1)', 'rgba(255,0,0,0.7)', 'rgba(255,0,0,0.4)'];
function Leftstart() {
var b = 0;
function setColorsLeft() {
for (var j = 0; j < 9; j++) {
$('div#lights aside:nth-child(' + (j + 1) + ')').css('background-color', rightside[j + 1]);
}
}
startcolors();
function startcolors() {
if (b++ <= 10) {
setColorsLeft();
var firstCol = rightside.shift();
rightside.push(firstCol);
setTimeout(startcolors, 100);
}
if (b == 12) {
a = 0;
b = 0;
Rightstart();
}
}
}
Rightstart();
</script>
</body>
<!-- Created By Supun Nanayakkara -->
</html>