Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·199 lines (189 loc) · 6.35 KB
/
Copy pathindex.html
File metadata and controls
executable file
·199 lines (189 loc) · 6.35 KB
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
<html>
<head>
<title>Iris</title>
<base id="base_href" href="<%= baseHref %>" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="Iris" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="#121212" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="theme-color" content="#222222" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<meta name="viewport" content="width=device-width" />
<style>
html {
background-color: #121212;
}
@keyframes loader {
0% { left: 0; right: 100%; }
50% { left: 0; right: 0; }
100% { left: 100%; right: 0; }
}
#app-loading {
position: fixed;
top: 50vh;
left: 0;
right: 0;
transform: translateY(-50%);
text-align: center;
padding: 30px 0;
}
#app-loading-logo {
filter: brightness(0) invert(1);
margin: 0 auto;
display: block;
width: 60vw;
max-width: 100px;
opacity: 0.25;
}
#app-loading-loader.loading {
position: relative;
margin: 30px auto 0;
width: 80vw;
max-width: 200px;
height: 3px;
border-radius: 3px;
overflow: hidden;
background-color: #1A1A1A;
}
#app-loading-loader.loading::before {
position: absolute;
display: block;
content: '';
height: 100%;
animation-name: loader;
background: #444444;
animation-duration: 1.8s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
}
#app-loading-message {
color: white;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 20px;
padding: 10px;
opacity: 0.3;
}
</style>
</head>
<script type="text/javascript">
var links = [
{ rel: 'manifest', href: 'manifest.json', crossorigin: 'use-credentials' },
{ rel: 'apple-touch-startup-image', href: 'assets/app-icon_512.png' },
{ rel: 'apple-touch-icon', href: 'assets/app-icon_192.png', sizes: '192x192' },
{ rel: 'apple-touch-icon', href: 'assets/app-icon_512.png', sizes: '512x512' },
{ rel: 'apple-touch-icon', href: 'assets/app-icon_57.png', sizes: '57x57' },
{ rel: 'apple-touch-icon', href: 'assets/app-icon_60.png', sizes: '60x60' },
{ rel: 'apple-touch-icon', href: 'assets/app-icon_72.png', sizes: '72x72' },
{ rel: 'apple-touch-icon', href: 'assets/app-icon_76.png', sizes: '76x76' },
{ rel: 'apple-touch-icon', href: 'assets/app-icon_114.png', sizes: '114x114' },
{ rel: 'apple-touch-icon', href: 'assets/app-icon_120.png', sizes: '120x120' },
{ rel: 'apple-touch-icon', href: 'assets/app-icon_144.png', sizes: '144x144' },
{ rel: 'apple-touch-icon', href: 'assets/app-icon_152.png', sizes: '152x152' },
{ rel: 'apple-touch-icon', href: 'assets/app-icon_180.png', sizes: '180x180' },
{ rel: 'shortcut icon', href: 'assets/favicon.png', class: 'favicon', type: 'image/ico' },
{ rel: 'shortcut icon', href: 'assets/favicon.png', class: 'favicon', type: 'image/x-icon' },
{ rel: 'shortcut-icon', href: 'assets/favicon.png', class: 'favicon' },
{ rel: 'mask-icon', href: 'assets/app-icon.svg', color: '#08d58f' },
];
for (const link of links) {
const linkObject = document.createElement('link');
linkObject.rel = link.rel;
linkObject.href = link.href;
if (link.type) linkObject.type = link.type;
if (link.sizes) linkObject.sizes = link.sizes;
if (link.color) linkObject.color = link.color;
if (link.crossorigin) linkObject.crossorigin = link.crossorigin;
document.head.appendChild(linkObject);
}
</script>
<body>
<div id="app">
<!-- ReactJS app gets injected here, replacing the loader -->
<div id="app-loading">
<img src="assets/app-icon.svg" id="app-loading-logo" />
<div id="app-loading-loader" class="loading"></div>
<div id="app-loading-message">
<div id="app-loading-message-base"></div>
<div id="app-loading-message-js"></div>
<div id="app-loading-message-css"></div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
if ('serviceWorker' in navigator){
navigator.serviceWorker.register('<%= baseHref %>service-worker.js')
.then(function(registration){
console.log('Service worker registered');
}).catch(function(error){
console.error('Service worker registration failed:', error);
});
}
</script>
<script type="text/javascript">
var setMessage = function(type = '', content = '') {
var element = document.getElementById(`app-loading-message-${type}`);
if (element) {
element.innerHTML += content;
}
}
var setLoading = function(loading) {
var element = document.getElementById('app-loading-loader');
if (element) {
element.className = loading ? 'loading' : '';
}
}
var build = "<%= build %>";
var version = "<%= version %>";
// Construct the script tag
var js = document.createElement("script");
js.type = "application/javascript";
// Construct our css tag
var css = document.createElement("link");
css.rel = "stylesheet";
// Check for test mode. This is toggled under Settings > Debug > Test mode or can
// be manually triggered with the URL var "?test_mode=1"
var test_mode = <%= isDevServer %> || window.location.href.indexOf('test_mode=1') > -1;
if (test_mode) {
window.test_mode = true;
localStorage.setItem('test_mode', true);
} else if (window.location.href.indexOf('test_mode=0') > -1) {
window.test_mode = false;
localStorage.removeItem('test_mode');
} else {
window.test_mode = localStorage.getItem('test_mode');
}
if (window.test_mode) {
setMessage('base', 'Test mode detected<br />');
}
if (window.test_mode){ // Test mode, use un-minified code
css.href = 'app.css?v='+build;
js.src = 'app.js?v='+build;
} else { // Production-grade, minified app
css.href = 'app.min.css?v='+build;
js.src = 'app.min.js?v='+build;
}
setMessage('js', 'Loading core... ');
setMessage('css', 'Loading interface... ');
js.>
setMessage('js', 'done');
}
js.>
setLoading(false);
setMessage('js', 'failed');
}
css.>
setMessage('css', 'done');
}
css.>
setLoading(false);
setMessage('css', 'failed');
}
// And finally inject our CSS/JS tags
document.body.appendChild(css);
document.body.appendChild(js);
</script>
</html>
You can’t perform that action at this time.