-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
55 lines (48 loc) · 1.47 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>GPS-LOGGER Stats for IRL v2</title>
<style>
@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700');
body {
background-color: #000000 !important;
margin: 5px;
padding: 5px;
font-family: 'Open Sans', sans-serif;
overflow: hidden;
color: #1e90ff;
font-size: 36px;
font-weight: 700;
text-transform: uppercase;
}
#data {
text-align: right;
padding: 10px;
-webkit-filter: drop-shadow( 0px 0px 9px rgba(0, 0, 0, .7));
filter: drop-shadow( 0px 0px 9px rgba(0, 0, 0, .7));
/* Similar syntax to box-shadow */
}
.a {
text-align: left !important;
}
</style>
</head>
<body>
<div id="data"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.2.0/socket.io.js"></script>
<script>
const socket = io();
const element = document.getElementById("data");
socket.on("data", data => {
html = "";
Object.keys(data).forEach(item => {
html += `<p class="${item}">${data[item]}</p>`;
});
element.innerHTML = html;
});
</script>
</body>
</html>