-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
41 lines (40 loc) · 1.42 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
<!doctype html>
<html lang="en">
<head>
<meta name="theme-color" content="#000000">
<meta charset="UTF-8" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="icon" type="image/svg+xml" href="/contrast-logo.svg" />
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0" />
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon-180x180.png">
<title>Contrast</title>
</head>
<body>
<div id="app"></div>
<script>
/**
* In some browsers display-mode: standalone
* does not match on DOMContentLoaded.
* If it does, then we can resize the window
* right away. Otherwise, we need to wait for
* the change event to fire for this media query.
*/
const media = matchMedia("(display-mode: standalone)");
const resizeWindow = (ev) => {
if (ev === undefined || ev.matches) {
window.resizeTo(500, 375);
media.removeEventListener('change', resizeWindow);
}
}
if (media.matches) {
resizeWindow();
} else {
media.addEventListener('change', resizeWindow);
}
</script>
<script type="module" src="/src/main.ts"></script>
</body>
</html>