-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
99 lines (87 loc) · 3.52 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
<!DOCTYPE html>
<html>
<head>
<meta name="theme-color" content="#303f9f">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="icon-144x144.png">
<title>PWA Timer</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css"
media="screen,projection" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="manifest" href="/PWA-Timer/manifest.json">
</head>
<body style="background: #303f9f; color: #FFFFFF;">
<main class="main" style="text-align: center; margin: 12.5%;">
<div id="timer-container" style="display:block">
<div>
<h3 class="timer">
<span id="hh">00</span> :
<span id="mm">00</span> :
<span id="ss">00</span>
</h3>
</div>
<div class="controls">
<a id="changeStateBtn" class="btn-floating btn-large waves-effect waves-light pink accent-2">
<i class="material-icons">play_arrow</i>
</a>
<a id="settingsBtn" class="btn-floating btn-small waves-effect waves-light pink accent-2" style="margin-top: 12px">
<i class="material-icons">settings</i>
</a>
<a id="resetBtn" class="btn-floating btn-large waves-effect waves-light pink accent-2">
<i class="material-icons">replay</i>
</a>
</div>
</div>
<div id="settings-container" style="display:none">
<div class="row">
<h5>Reminder Interval</h5>
<form class="col s12">
<div class="row">
<div class="input-field col s6">
<select id="hoursSelect">
<option value="0" selected>0</option>
</select>
<label>Hours</label>
</div>
<div class="input-field col s6">
<select id="minutesSelect">
<option value="0" selected>0</option>
</select>
<label>Minutes</label>
</div>
<div class="col s12" style="margin-top: 40px">
<a id="backBtn" class="waves-effect waves-light btn pink accent-2" style="margin-bottom: 5px;">
<i class="large material-icons">arrow_back</i>
</a>
<a id="applyBtn" class="waves-effect waves-light btn pink accent-2" style="margin-bottom: 5px;">Apply</a>
</div>
</div>
</div>
</main>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>
<script type="text/javascript" src="app-v1.1.js" async></script>
<script>
/*Setup the reminder interval dropdown select menus*/
$(document).ready(function () {
$('select').material_select();
if (!Notification) {
canUseNotifications = false;
} else {
Notification.requestPermission();
}
});
let hours = document.getElementById("hoursSelect");
let minutes = document.getElementById("minutesSelect");
for (let i = 1; i < 25; i++) {
hours.innerHTML += "<option value=" + i + ">" + i + "</option>"
}
for (let i = 1; i < 60; i++) {
minutes.innerHTML += "<option value=" + i + ">" + i + "</option>"
}
</script>
</body>
</html>