forked from GDGCatania/GDG_Avatar_PWA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
153 lines (130 loc) · 6.13 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
<!--
@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 http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Polymer Starter Kit">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>GDG Avatar</title>
<meta name="author" content="Maggio Alessandro (Tkd-Alex), Gabriele Messina (Harvey_Specter)">
<meta name="GDG Avatar" content="This tool allow user to create GDG (Google Developer Group) avatar.">
<!--
If deploying to a non-root path, replace href="/" with the full path to the project root.
For example: href="/polymer-starter-kit/relative-path-example/"
-->
<base href="/">
<!-- See https://goo.gl/OOhYW5 -->
<link rel="manifest" href="manifest.json">
<!-- See https://goo.gl/qRE0vM -->
<meta name="theme-color" content="#03A9F4">
<!-- Add to homescreen for Chrome on Android. Fallback for manifest.json -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="application-name" content="GDG Avatar">
<!-- 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="GDG Avatar">
<link rel="shortcut icon" href="../favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="152x152" href="../favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="144x144" href="../favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="120x120" href="../favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="114x114" href="../favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="76x76" href="../favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="72x72" href="../favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="60x60" href="../favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="57x57" href="../favicons/apple-touch-icon-57x57.png">
<link rel="icon" type="image/png" href="../favicons/favicon-196x196.png">
<link rel="icon" type="image/png" href="../favicons/favicon-160x160.png">
<link rel="icon" type="image/png" href="../favicons/favicon-96x96.png">
<link rel="icon" type="image/png" href="../favicons/favicon-32x32.png">
<link rel="icon" type="image/png" href="../favicons/favicon-16x16.png">
<!-- Tile icon for Windows 8 (144x144 + tile color) -->
<meta name="msapplication-TileImage" content="../favicons/apple-touch-icon-144x144.png">
<meta name="msapplication-TileColor" content="#03A9F4">
<meta name="msapplication-tap-highlight" content="no">
<script src="../lib/js/jquery.min.js"></script>
<script>
// Register the base URL
const baseUrl = document.querySelector('base').href;
// Load and register pre-caching Service Worker
// if ('serviceWorker' in navigator) {
// window.addEventListener('load', function() {
// navigator.serviceWorker.register(baseUrl + 'service-worker.js');
// });
// }
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/service-worker.js').then(function(reg) {
console.log('Registration succeeded. Scope is ' + reg.scope);
if (!navigator.serviceWorker.controller) {
return;
}
if (reg.waiting) {
updateReady(reg.waiting);
return;
}
if (reg.installing) {
trackInstalling(reg.installing);
return;
}
reg.addEventListener('updatefound', function() {
trackInstalling(reg.installing);
});
}).catch(function(error) {
// registration failed
console.log('Registration failed with ' + error);
});
trackInstalling = function(worker) {
var indexController = this;
worker.addEventListener('statechange', function() {
if (worker.state == 'installed') {
updateReady(worker);
}
});
};
updateReady = function(worker) {
var editor = document.querySelector("avatar-app");
editor.set('newVersion', true);
};
}
</script>
<script src="/bower_components/webcomponentsjs/webcomponents-loader.js"></script>
<!-- Load webcomponents-loader.js to check and load any polyfills your browser needs -->
<!-- <script src="bower_components/webcomponentsjs/webcomponents-loader.js"></script> -->
<!-- Load your application shell -->
<link rel="import" href="src/avatar-app.html">
<!-- 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;
}
</style>
</head>
<body>
<avatar-app></avatar-app>
<noscript>
Please enable JavaScript to view this website.
</noscript>
<!-- Built with love using Polymer Starter Kit -->
</body>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-100823046-1', 'auto');
ga('send', 'pageview');
</script>
</html>