forked from jarek-foksa/xel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
67 lines (61 loc) · 1.81 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
<!DOCTYPE html>
<!-- This is Xel home page. -->
<html id="xel-home-page">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<base href="/"/>
<title>Xel</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,400i,500,500i,700,700i" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
<link id="theme-link" rel="stylesheet">
<style>
html, body {
width: 100%;
height: 100%;
display: flex;
flex: 1;
}
*:not(:defined) {
display: none;
}
#splashscreen {
background: #eeeeee;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999999;
}
</style>
<script>
// Supported browser
if (
window.customElements &&
window.customElements.define &&
window.DOMPoint &&
window.DOMRect &&
window.HTMLDialogElement &&
window.HTMLDialogElement.prototype.showModal &&
window.PointerEvent &&
window.ShadowRoot
) {
let theme = sessionStorage.getItem("theme") || "material";
let themePath = `/node_modules/xel/themes/${theme}.css`;
document.querySelector("#theme-link").setAttribute("href", themePath);
window.addEventListener("load", function(event) {window["splashscreen"].remove()});
}
// Unsupported browser
else {
window.location.replace("/fallback.html");
}
</script>
<script src="node_modules/prismjs/prism.js" data-manual></script>
<script type="module" src="xel.js"></script>
</head>
<body>
<div id="splashscreen"></div>
<xel-app id="app"></xel-app>
</body>
</html>