-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.html
52 lines (46 loc) · 1.98 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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="views/styles.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons|Roboto:400,500,700">
<link type="text/jsonArray" href="simple_components.json">
<title>Unchive</title>
</head>
<body>
</body>
<script defer type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="module">
window.DEBUG = true;
window.fetchDir = (dir) => {
return window.DEBUG ? dir : '../' + dir;
}
import { Screen } from './views/screen.js';
import { URLHandler, ScriptLoader } from './views/widgets.js'
ScriptLoader.loadScript(fetchDir('lib/zip/zip.js'), () => {
ScriptLoader.loadScript(fetchDir('lib/zip/zip-ext.js'), () => {
ScriptLoader.loadScript(fetchDir('lib/flatted/flatted.min.js'), () => {
ScriptLoader.loadScript(
fetchDir(`i18n/js/${URLHandler.getReqParams().locale || 'en'}.js`),
() => {
window.Messages = Messages;
window.locales = [['English', 'en'], ['German', 'de'], ['Spanish', 'es']];
window.locale = window.locales.find(x => x[1] == URLHandler.getReqParams().locale) || window.locales[0];
console.log(window.locale);
ScriptLoader.loadScript(fetchDir('lib/blockly/blockly_compressed.js'),
() => {
ScriptLoader.loadScript(fetchDir('lib/blockly/blocks_compressed.js'));
});
zip.workerScriptsPath = fetchDir('lib/zip/');
window.RootPanel = new Screen();
RootPanel.setStyleName('root-panel');
RootPanel.handleURLData();
document.body.appendChild(RootPanel.domElement);
google.charts.load('current', {'packages':['corechart']});
});
});
});
});
</script>
</html>