forked from sitepoint-editors/gmail-api-javascript-example
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
82 lines (76 loc) · 2.62 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
<!doctype html>
<html>
<head>
<title>Gmail API demo</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<style>
iframe {
width: 100%;
border: 0;
min-height: 80%;
height: 600px;
display: flex;
}
.nowrap {
white-space: nowrap;
}
</style>
</head>
<body>
<div class="container">
<h1>Gmail API demo</h1>
<button id="authorize-button" class="btn btn-primary hidden">Authorize</button>
<table class="table table-striped table-bordered table-inbox hidden">
<thead>
<tr>
<th>From</th>
<th>Subject</th>
<th>Date/Time</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div class="modal fade" id="message-modal" tabindex="-1" role="dialog" aria-labelledby="myModalTitle">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="myModalTitle"></h4>
</div>
<div class="modal-body">
<iframe id="message-iframe" srcdoc="<p>Loading...</p>">
</iframe>
</div>
</div>
</div>
</div>
<script id="row-template" type="x-tmpl-mustache">
<tr>
<td>{{from}}</td>
<td>
<a href="#" class="message-link" data-toggle="modal" id="message-link-{{messageId}}">
{{subject}}
</a>
</td>
<td class="nowrap">{{date}}</td>
</tr>
</script>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js"></script>
<!--
// I don't know the reason why mustache is not loading via cdnjs,
// so no choice but to load it locally
<script src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.1.3/mustache.min.js" type="text/javascript"></script>
-->
<script src="bower_components/mustache/mustache.min.js"></script>
<script src="main.js"></script>
<script src="config.js"></script>
<script src="https://apis.google.com/js/client.js?onload=handleClientLoad"></script>
</body>
</html>