forked from deephaven/web-client-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
61 lines (59 loc) · 2.18 KB
/
index.html
File metadata and controls
61 lines (59 loc) · 2.18 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="ui-version" content="v#npm_package_version#" />
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#2d2a2e" />
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json" />
<link rel="icon" href="#VITE_FAVICON#" />
<!-- The script is currently tightly coupled with the server -->
<script
src="#VITE_CORE_API_URL#/#VITE_OPEN_API_NAME#"
type="text/javascript"
></script>
<script
src="#VITE_CORE_API_URL#/#VITE_CORE_API_NAME#"
type="text/javascript"
></script>
<script>
(function () {
document.addEventListener('DOMContentLoaded', function () {
// If for some reason the API doesn't load, our app will not work. Write out a message to help the user.
if (!window.dh) {
document.getElementById('root').insertAdjacentHTML(
'afterbegin',
`<div class="modal d-block">
<div class="modal-dialog modal-dialog-centered theme-bg-light">
<div class="modal-content">
<div class="modal-body">
<h5 class="modal-title">Error: Unable to load API</h5>
<p class="text-break">Ensure the server is running and you are able to reach #VITE_CORE_API_URL#/#VITE_CORE_API_NAME#, then refresh the page.</p>
</div>
</div>
</div>
</div>`
);
}
});
})();
</script>
<title>Deephaven Styleguide</title>
</head>
<body>
<noscript> You need to enable JavaScript to run this app. </noscript>
<div id="root"></div>
<!--
Absolute from root b/c of Vite dev server
Could move to relative URL possibly if we moved Vite root to /src
-->
<script type="module" src="/src/styleguide/index.tsx"></script>
</body>
</html>