-
Notifications
You must be signed in to change notification settings - Fork 0
/
welcome.html
41 lines (39 loc) · 1.58 KB
/
welcome.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="https://fonts.googleapis.com/css2?family=Great+Vibes&family=Roboto:wght@700&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="/styles.css">
</head>
<body class="full-height" onload="clock()">
<div class="App">
<h1>Welcome to Tide Clock</h1>
<div id="currentTime" class="time">
<script>
function clock() {
const today = new Date();
let h = today.getHours();
let m = today.getMinutes();
let s = today.getSeconds();
h = checkTime(h);
m = checkTime(m);
s = checkTime(s);
document.getElementById('currentTime').innerHTML =
h + ":" + m + ":" + s;
let t = setTimeout(clock, 1000);
}
function checkTime(i) {
if (i < 10) { i = "0" + i }; // add zero in front of numbers < 10
return i;
}
</script>
</div>
<div>
<h2>Please setup your clock by connecting to the Tide Clock Setup wireless access point</h2>
<h2>1) ssid: Tide Clock Setup</h2>
<h2>2) Open a browser at 192.168.42.1</h2>
<h2>3) Set the location using any web browser on your local network at http://tideclock.local:5000</h2>
</div>