-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathindex.html
163 lines (153 loc) · 5.2 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
<!doctype html>
<html lang="en">
<head>
<!-- COMMON TAGS -->
<meta charset="utf-8">
<title>Pendulums</title>
<!-- Search Engine -->
<meta name="description" content="Optimize your life">
<meta name="image" content="https://pendulums.io/img/pendulums-logos/pendulums-color-logo.png">
<!-- Schema.org for Google -->
<meta itemprop="name" content="Pendulums">
<meta itemprop="description" content="Optimize your life">
<meta itemprop="image" content="https://pendulums.io/img/pendulums-logos/pendulums-color-logo.png">
<!-- Twitter -->
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Pendulums">
<meta name="twitter:description" content="Optimize your life">
<meta name="twitter:site" content="@pendulums_io">
<meta name="twitter:creator" content="@pendulums_io">
<meta name="twitter:image:src" content="https://pendulums.io/img/pendulums-logos/pendulums-meta-image-small.jpg">
<!-- Open Graph general (Facebook, Pinterest & Google+) -->
<meta name="og:title" content="Pendulums">
<meta name="og:description" content="Optimize your life">
<meta name="og:image" content="https://pendulums.io/img/pendulums-logos/pendulums-meta-image.jpg">
<meta name="og:url" content="https://pendulums.io/">
<meta name="og:site_name" content="Pendulums">
<meta name="og:locale" content="en_Us">
<meta name="fb:admins" content="505011733189287">
<meta name="og:type" content="website">
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<style>
#loader-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1000;
background-color: #464553;
display: inline-block;
}
#loader {
position: relative;
width: 24px;
height: 24px;
top: 46%;
top: -webkit-calc(50% - 12px);
top: calc(50% - 12px);
left: 46%;
left: -webkit-calc(50% - 12px);
left: calc(50% - 12px);
border-radius: 12px;
background-color: #ffd470;
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50% ;
-webkit-animation: spin 1s ease-in-out infinite;
animation: spin 1s ease-in-out infinite;
}
#loader:before{
content: "";
position: absolute;
background-color: #ffd470;
top: 0px;
left: -49px;
height: 24px;
width: 24px;
border-radius: 24px;
}
#loader:after{
content: "";
position: absolute;
background-color: #ffd470;
top: 0px;
left: 49px;
height: 24px;
width: 24px;
border-radius: 24px;
}
@-webkit-keyframes spin{
0%{-webkit-transform:rotate(0deg);}
50%{-webkit-transform:rotate(180deg);}
100%{-webkit-transform:rotate(180deg);}
}
@keyframes spin{
0%{transform:rotate(0deg);}
50%{transform:rotate(180deg);}
100%{transform:rotate(180deg);}
}
</style>
</head>
<body>
<div id="loader-wrapper">
<div id="loader"></div>
</div>
<app-root></app-root>
<script>
function getBrowser() {
var ua = navigator.userAgent, tem,
M = ua.match(/(opera|chrome|safari|edge|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
if(/trident/i.test(M[1])){
tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
return {name:'IE',version:(tem[1] || '')};
}
if(M[1]=== 'Chrome'){
tem = ua.match(/\b(OPR|Edge)\/(\d+)/);
if(tem != null) return {name:tem[1].replace('OPR', 'Opera'),version:tem[2]};
}
M = M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];
if((tem = ua.match(/version\/(\d+)/i))!= null)
M.splice(1, 1, tem[1]);
return {name:M[0], version:M[1]};
}
function initBody() {
var browser = getBrowser();
if ((browser.name === 'Firefox' && browser.version < 58) ||
(browser.name === 'Edge' && browser.version < 17) ||
(browser.name === 'Opera' && browser.version < 51) ||
(browser.name === 'Safari' && browser.version < 10) ||
(browser.name === 'IE')) {
console.log('we do not support this browser version');
var html = '<div style="color: white;height: 100vh;padding: 40px;display: flex;justify-content: center;align-items: center;">' +
'<p>We do not support this browser.<br>' +
'Please use a modern browser like FireFox 58+, Chrome 62+, Edge 17+, Opera 51+ or Safari 10+.<br><br><br>' +
'Thank you,<br>' +
'Pendulums team</p></div>';
document.body.innerHTML = html;
}
}
function applyPolyfills() {
if (!HTMLCanvasElement.prototype.toBlob) {
Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {
value: function (callback, type, quality) {
var canvas = this;
setTimeout(function() {
var binStr = atob( canvas.toDataURL(type, quality).split(',')[1] ),
len = binStr.length,
arr = new Uint8Array(len);
for (var i = 0; i < len; i++ ) {
arr[i] = binStr.charCodeAt(i);
}
callback( new Blob( [arr], {type: type || 'image/png'} ) );
});
}
});
}
}
initBody();
applyPolyfills();
</script>
</body>
</html>