-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
238 lines (203 loc) · 7.12 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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!--
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="generator" content="Polymer Starter Kit">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>My App</title>
<meta name="description" content="My App description">
<link rel="icon" href="/images/favicon.ico">
<!-- See https://goo.gl/OOhYW5 -->
<link rel="manifest" href="/manifest.json">
<!-- See https://goo.gl/qRE0vM -->
<meta name="theme-color" content="#3f51b5">
<!-- Add to homescreen for Chrome on Android. Fallback for manifest.json -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="application-name" content="My App">
<!-- Add to homescreen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="My App">
<!-- Homescreen icons -->
<link rel="apple-touch-icon" href="/images/manifest/icon-48x48.png">
<link rel="apple-touch-icon" sizes="72x72" href="/images/manifest/icon-72x72.png">
<link rel="apple-touch-icon" sizes="96x96" href="/images/manifest/icon-96x96.png">
<link rel="apple-touch-icon" sizes="144x144" href="/images/manifest/icon-144x144.png">
<link rel="apple-touch-icon" sizes="192x192" href="/images/manifest/icon-192x192.png">
<!-- Tile icon for Windows 8 (144x144 + tile color) -->
<meta name="msapplication-TileImage" content="/images/manifest/icon-144x144.png">
<meta name="msapplication-TileColor" content="#3f51b5">
<meta name="msapplication-tap-highlight" content="no">
<!-- Add any global styles for body, document, etc. -->
<style>
body {
margin: 0;
font-family: 'Roboto', 'Noto', sans-serif;
line-height: 1.5;
min-height: 100vh;
background-color: #eeeeee;
background: -webkit-linear-gradient(-45deg, rgba(12, 34, 255, 0.05), rgba(222, 12, 255, 0.1));
background: linear-gradient(-45deg, rgba(12, 34, 255, 0.05), rgba(222, 12, 255, 0.1));
}
/* styling for render while resources are loading */
.splash {
display: block;
text-align: center;
font-weight: 300;
font-size: 18px;
color: black;
max-width: 400px;
margin: auto;
padding-top: 10%;
}
.header {
height: 300px;
overflow: hidden;
}
.loading {
animation: blink 1.5s linear infinite;
-o-animation: blink 1.5s linear infinite;
-moz-animation: blink 1.5s linear infinite;
-webkit-animation: blink 1.5s linear infinite;
}
@keyframes blink {
0% {
opacity: 1;
}
50% {
opacity: 0.2;
}
100% {
opacity: 1;
}
}
@-webkit-keyframes blink {
0% {
opacity: 1;
}
50% {
opacity: 0.2;
}
100% {
opacity: 1;
}
}
@-moz-keyframes blink {
0% {
opacity: 1;
}
50% {
opacity: 0.2;
}
100% {
opacity: 1;
}
}
@-o-keyframes blink {
0% {
opacity: 1;
}
50% {
opacity: 0.2;
}
100% {
opacity: 1;
}
}
.footer {
font-size: 13px;
}
a:link,
a:visited {
color: blue;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<my-app id="myAppElementId">
<div class="splash">
<div class="header">
<div style="font-size: 2.8em;">Nephcounter</div>
<p>A Nutrient Monitoring and Reporting App Specialized for the needs of Dialysis Patients</p>
<br>
<p class="loading"> Loading... </p>
</div>
<p class="footer">Made with Google Polymer/2, Firebase, Redux, and the USDA nutrition database. Created by
<a href="https://www.facebook.com/sandra.fons.94?fref=ts">Sandra M. Fons</a>, User Experience Consultant, and
<a href="https://www.linkedin.com/in/michaelafons">Michael A. Fons</a>, Applications Developer. Consulting Nutritionist: Lesley Cloke, R.D. Find this on
<a href="https://github.com/mfons/nephcounter">GitHub</a>.</p>
</div>
</my-app>
<!-- Built with love using Polymer Starter Kit -->
<!-- Load and register pre-caching Service Worker -->
<script>
function _updateReady(worker) {
console.log("there is a service worker update ready");
const myAppElement = document.querySelector("#myAppElementId");
myAppElement.myServiceWorker = worker;
}
function _detectNewServiceWorkerReadyToInstall(reg) {
// if there's no controller, this page wasn't loaded
// via a service worker, so they're looking at the latest version.
// In that case, exit early
if (!navigator.serviceWorker.controller) {
return;
}
// if there's an updated worker already waiting, call
if (reg.waiting) {
_updateReady(reg.waiting);
return;
}
// if there's an updated worker installing, track its
// progress. If it becomes "installed",
if (reg.installing) {
reg.installing.addEventListener('statechange', () => {
if (this.state === 'installed') {
_updateReady(reg.installing);
}
})
}
else {
reg.addEventListener('updateFound', () => {
if (this.state === 'installed') {
_updateReady(reg.installing);
}
})
}
}
if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker.register('/service-worker.js').then(function(reg) { // NB: if you ever want to continue building your own service worker you already started one at /my-service-worker.js in conjunction with your udacity course.
// navigator.serviceWorker.register('/my-service-worker.js').then(function (reg) {
// _detectNewServiceWorkerReadyToInstall(reg);
}).catch(function () {
console.warn('Service Worker Registration Failed!');
});
// ++++listen for the controlling service worker changing
// and reload the page -- part of "my-service-worker"
navigator.serviceWorker.addEventListener('controllerchange', function () {
document.location.reload();
});
});
}
</script>
<!-- Load webcomponents-loader.js to check and load any polyfills your browser needs -->
<script src="/bower_components/webcomponentsjs/webcomponents-loader.js"></script>
<script src="/node_modules/redux/dist/redux.js"></script>
<!-- Load your application shell -->
<link rel="import" href="/src/my-app.html">
</body>
</html>