-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathviewer.html
46 lines (44 loc) · 1.25 KB
/
viewer.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>Chemr</title>
<script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
</head>
<body style="margin: 0; padding: 0; height: 100vh; width: 100vw; overflow: hidden; background: #00bcd4">
<div class='loading'>
<style>
@keyframes spin{
0% { transform: rotate(0deg); }
100% { transform: rotate(1080deg); }
}
.loading {
box-sizing: border-box;
display: block;
width: 36px;
height: 36px;
border-width: 4px;
border-style: solid;
border-color: transparent #fbfbfb;
border-radius: 18px;
animation: spin 2s ease-in-out infinite;
margin: 100px auto;
}
</style>
</div>
<chemr-viewer></chemr-viewer>
<script>
requestAnimationFrame(function () {
var link = document.createElement('link');
link.rel = "import";
link.href = "src/chemr-viewer.html";
link.addEventListener('load', function () {
var loading = document.querySelector('.loading');
loading.parentNode.removeChild(loading);
});
document.body.appendChild(link);
});
</script>
</body>
</html>