-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmessage.h
More file actions
76 lines (71 loc) · 1.76 KB
/
message.h
File metadata and controls
76 lines (71 loc) · 1.76 KB
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
char message[] PROGMEM = R"=====(
<!DOCTYPE html>
<html>
<head>
<title>Settings Saved!</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
html {
height: 100%;
}
body {
height: 100%;
margin: 0;
font-family: "Roboto", "Arial", sans-serif, "Open Sans";
user-select: none;
-moz-user-select: none;
display: grid;
grid-template-columns: 1fr;
grid-template-rows: repeat(4, 1fr);
grid-column-gap: 0px;
grid-row-gap: 0px;
}
#box {
grid-area: 2 / 1 / 4 / 2;
position: relative;
}
#messageBox {
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 100%;
font-size: 9vmin;
overflow: hidden;
}
#time {
color: red;
font-weight: bold;
}
</style>
</head>
<body>
<div id="box">
<div id="messageBox">
Settings have been successfully saved!<br><br>
Please wait <span id="time">...</span>
seconds while the device resets.
</div>
</div>
<script>
function startTimer(duration, display) {
var timer = duration;
setInterval(function() {
if (timer < 0) {
window.location.href = "/";
timer = 0;
}
display.innerHTML = timer;
timer--;
}, 1000)
};
window.onload = function () {
var secondCount = 10,
display = document.getElementById("time");
startTimer(secondCount, display);
};
</script>
</body>
</html>
)=====";