-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
196 lines (158 loc) · 7.97 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Theme color -->
<meta name="theme-color" content="#000" />
<!-- PWA Manifest -->
<link rel="manifest" href="/pwa/manifest.json">
</link>
<!-- Favicon -->
<link rel="icon" type="image/png" href="/pwa/icons/chrome/chrome-favicon-16-16.png">
<!-- Only for iOS: Configs (Compatibility iOS) -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="jfaPWAtkDemo">
<!-- Icons (Compatibility iOS) -->
<link rel="apple-touch-icon" href="/pwa/icons/ios/ios-appicon-76-76.png">
<link rel="apple-touch-icon" href="/pwa/icons/ios/ios-appicon-120-120.png" sizes="120x120">
<link rel="apple-touch-icon" href="/pwa/icons/ios/ios-appicon-152-152.png" sizes="152x152">
<link rel="apple-touch-icon" href="/pwa/icons/ios/ios-appicon-180-180.png" sizes="180x180">
<link rel="apple-touch-icon" href="/pwa/icons/ios/ios-appicon-1024-1024.png" sizes="1024x1024">
<!-- Splash Screen (Compatibility iOS) -->
<link rel="apple-touch-startup-image" href="/pwa/icons/ios/ios-launchimage-640-960.png" sizes="640x960">
<link rel="apple-touch-startup-image" href="/pwa/icons/ios/ios-launchimage-640-1136.png" sizes="640x1136">
<link rel="apple-touch-startup-image" href="/pwa/icons/ios/ios-launchimage-750-1334.png" sizes="750x1334">
<link rel="apple-touch-startup-image" href="/pwa/icons/ios/ios-launchimage-768-1024.png" sizes="768x1024">
<link rel="apple-touch-startup-image" href="/pwa/icons/ios/ios-launchimage-1024-768.png" sizes="1024x768">
<link rel="apple-touch-startup-image" href="/pwa/icons/ios/ios-launchimage-1242-2208.png" sizes="1242x2208">
<link rel="apple-touch-startup-image" href="/pwa/icons/ios/ios-launchimage-1334-750.png" sizes="1334x750">
<link rel="apple-touch-startup-image" href="/pwa/icons/ios/ios-launchimage-1536-2048.png" sizes="1536x2048">
<link rel="apple-touch-startup-image" href="/pwa/icons/ios/ios-launchimage-2048-1536.png" sizes="2048x1536">
<link rel="apple-touch-startup-image" href="/pwa/icons/ios/ios-launchimage-2208-1242.png" sizes="2208x1242">
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<!--Your app -->
<link rel="stylesheet" href="/assets/app.css">
<title>JFA PWA Toolkit Demo</title>
</head>
<body>
<div class="navbar-fixed">
<nav class=" light-blue">
<div class="nav-wrapper">
<a href="#" class="brand-logo">PWA Toolkit</a>
<a href="#" data-target="mobile-menu" class="sidenav-trigger">
<i class="material-icons">menu</i>
</a>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li><a href="https://github.com/jfadev/jfa-pwa-toolkit/blob/master/README.md">Docs</a></li>
<li><a href="https://github.com/jfadev/jfa-pwa-toolkit">GitHub</a></li>
</ul>
</div>
</nav>
</div>
<ul class="sidenav" id="mobile-menu">
<li><a href="/index.html">Home</a></li>
<li><a href="/page1.html">Page 1</a></li>
<li><a href="/page2.html">Page 2</a></li>
<li><a href="/page3.html">Page 3 (not precached)</a></li>
<li><a href="https://github.com/jfadev/jfa-pwa-toolkit/blob/master/README.md">Docs</a></li>
<li><a href="https://github.com/jfadev/jfa-pwa-toolkit">GitHub</a></li>
</ul>
<div class="container">
<div class="section center">
<img class="responsive-img" src="/assets/logo.jpg">
<h3 class="header">Notifications</h3>
<hr />
<h5>Displays a pop-up requesting permission to allow Notifications</h5>
<p>
<button type="button" id="btn-requesting-permission" class="waves-effect waves-light btn-large light-blue darken-1">
<i class="material-icons right">security</i>
Permission to allow Notifications
</button>
</p>
<hr />
<h5>Show Notification sent by the browser</h5>
<p>
<div class="row grey lighten-5">
<div class="input-field col s12">
<input id="push-title" type="text" value="Notification Title">
<label for="first_name">Title</label>
</div>
<div class="input-field col s12">
<textarea id="push-msg" class="materialize-textarea">Extra content to display within the notification</textarea>
<label for="textarea1">Message</label>
</div>
</div>
<button type="button" id="btn-show-notification" class="waves-effect waves-light btn-large light-blue darken-1">
<i class="material-icons right">send</i>
Show Notification
</button>
</p>
<hr />
<h3 class="header">Navigator</h3>
<hr />
<h5>Test precache/cache/offline</h5>
<p>
click on the button and follow the instructions<br />
<br />
<a href="/page1.html" class="waves-effect waves-light btn-large light-blue darken-1">
<i class="material-icons right">arrow_right</i>
Go to page 1
</a>
</p>
<hr />
<h5>Clear the browser app cache</h5>
<p>
<button type="button" id="btn-clear-cache" class="waves-effect waves-light btn-large light-blue darken-1">
<i class="material-icons right">delete</i>
Clear Cache
</button>
</p>
<hr />
<h3 class="header">Push Notifications</h3>
<p>This feature will be added in the next update.</p>
<hr />
<h5>Button to subscribe to Push Notifications</h5>
<p>
<button type="button" id="btn-subscription" disabled class="waves-effect waves-light btn-large light-blue darken-1">
<i class="material-icons right">notifications</i>
Subscribe to Push Notifications
</button>
</p>
<hr />
<h5>Checkbox toggle to subscribe/unsubscribe to Push Notifications</h5>
<p>
<div class="switch">
<label>
Off
<input type="checkbox" disabled id="toggle-subscription">
<span class="lever"></span>
On
</label>
</div>
</p>
</div>
</div>
<footer class="page-footer light-blue">
<div class="footer-copyright">
<div class="container">
Made with
<a class="white-text" href="https://github.com/jfadev/jfa-pwa-toolkit">jfa-pwa-toolkit</a> by
<a class="white-text" href="https://jordifernandes.com">@jfadev</a>
</div>
</div>
</footer>
<!-- Materialize (front-end framework based on Material Design) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<!-- JFA PWA Toolkit -->
<script type="text/javascript" src="/pwa/config.js"></script>
<script type="text/javascript" src="/pwa/pwa.js"></script>
<!-- Your app -->
<script type="text/javascript" src="/assets/app.js"></script>
</body>
</html>