-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathIndex.html
More file actions
68 lines (54 loc) · 2.17 KB
/
Index.html
File metadata and controls
68 lines (54 loc) · 2.17 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
<!DOCTYPE html>
<html>
<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">
<base target="_top">
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Montserrat', sans-serif;
}
</style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<script>
function onSuccess1(quoteData) {
var quoteActual = document.getElementById('quote');
quoteActual.innerHTML = quoteData.quote;
var quoteImg = document.getElementById('quoteImage');
quoteImg.innerHTML = quoteData.imageTag;
}
setInterval(function() {
console.log("getting quote...")
google.script.run.withSuccessHandler(onSuccess1).randomQuotes();
}, 10000);
</script>
<script>
function onSuccess2(now) {
var div = document.getElementById('time');
var today = new Date();
var time = today.getHours() + " : " + today.getMinutes() + " : " + today.getSeconds();
div.innerHTML = time;
}
setInterval(function() {
console.log("getting time...")
google.script.run.withSuccessHandler(onSuccess2).getTime();
}, 1000);
</script>
</head>
<body>
<div class="container center">
<div class="row" style='margin-top:10%;'>
<div class="col s8 push-s4" style='margin-top:10%;'><span class="flow-text" id='quote'></span></div>
<div class="col s4 pull-s8" id='quoteImage'></div>
</div>
<div class="row">
<h3><div id='time'></div></h3>
</div>
</div>
</body>
</html>