-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.h
149 lines (137 loc) · 3.87 KB
/
index.h
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
const char MAIN_page[] PROGMEM = R"=====(
<!DOCTYPE html>
<html>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Mountains+of+Christmas:wght@700&display=swap" rel="stylesheet">
<style>
.card{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
min-width: 40%;
max-width: 90%;
min-height: 250px;
background: #02b875;
padding: 30px;
box-sizing: border-box;
color: #FFF;
margin:20px;
box-shadow: 0px 2px 18px -4px rgba(0,0,0,0.75);
vertical-align: middle;
text-align: center;
}
.winter-is-coming, .snow {
z-index: 100;
pointer-events: none;
}
.winter-is-coming {
overflow: hidden;
position: absolute;
top: 0;
height: 100%;
width: 90%;
max-width: 100%;
}
.snow {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
-webkit-animation: falling linear infinite both;
animation: falling linear infinite both;
-webkit-transform: translate3D(0, -100%, 0);
transform: translate3D(0, -100%, 0);
}
.snow--near {
-webkit-animation-duration: 10s;
animation-duration: 10s;
background-image: url("https://dl6rt3mwcjzxg.cloudfront.net/assets/snow/snow-large-075d267ecbc42e3564c8ed43516dd557.png");
background-size: contain;
}
.snow--near + .snow--alt {
-webkit-animation-delay: 5s;
animation-delay: 5s;
}
.snow--mid {
-webkit-animation-duration: 20s;
animation-duration: 20s;
background-image: url("https://dl6rt3mwcjzxg.cloudfront.net/assets/snow/snow-medium-0b8a5e0732315b68e1f54185be7a1ad9.png");
background-size: contain;
}
.snow--mid + .snow--alt {
-webkit-animation-delay: 10s;
animation-delay: 10s;
}
.snow--far {
-webkit-animation-duration: 30s;
animation-duration: 30s;
background-image: url("https://dl6rt3mwcjzxg.cloudfront.net/assets/snow/snow-small-1ecd03b1fce08c24e064ff8c0a72c519.png");
background-size: contain;
}
.snow--far + .snow--alt {
-webkit-animation-delay: 15s;
animation-delay: 15s;
}
@-webkit-keyframes falling {
0% {
-webkit-transform: translate3D(-7.5%, -100%, 0);
transform: translate3D(-7.5%, -100%, 0);
}
100% {
-webkit-transform: translate3D(7.5%, 100%, 0);
transform: translate3D(7.5%, 100%, 0);
}
}
@keyframes falling {
0% {
-webkit-transform: translate3D(-7.5%, -100%, 0);
transform: translate3D(-7.5%, -100%, 0);
}
100% {
-webkit-transform: translate3D(7.5%, 100%, 0);
transform: translate3D(7.5%, 100%, 0);
}
}
</style>
<body style="background-image: url('https://wallpapercave.com/wp/Tu9lcXU.jpg'); background-size: 100%;">
<div class="winter-is-coming">
<div class="snow snow--near"></div>
<div class="snow snow--near snow--alt"></div>
<div class="snow snow--mid"></div>
<div class="snow snow--mid snow--alt"></div>
<div class="snow snow--far"></div>
<div class="snow snow--far snow--alt"></div>
</div>
<p><span id="information" style="color: #848484;"></span></p>
<div class="card">
<p style="font-size: 120px; font-family: 'Mountains of Christmas', cursive;"><span id="name">Santa Claus</span></p>
</div>
<script>
setInterval(function() {
// Call a function repetatively with 2 Second interval
getData();
}, 1000);
function getData() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("name").innerHTML = this.responseText;
}
};
xhttp.open("GET", "nextName", true);
xhttp.send();
/*var infoXhttp = new XMLHttpRequest();
infoXhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("information").innerHTML = this.responseText;
}
};
infoXhttp.open("GET", "battery ", true);
infoXhttp.send();*/
}
</script>
</body>
</html>
)=====";