-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
81 lines (76 loc) · 2.27 KB
/
index.html
File metadata and controls
81 lines (76 loc) · 2.27 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta name='description' content='Connect N is an offline-first PWA multiplayer connection board game. You decide the number of columns and rows. The first player to form a horizontal, vertical, or diagonal line of N pieces wins the game.'>
<meta name='theme-color' content='#282828'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, viewport-fit=cover'>
<link rel='icon' href='./src/icon.svg'>
<link rel='manifest' href='manifest.webmanifest'>
<link rel='modulepreload' href='./src/app.js'>
<link rel='modulepreload' href='./src/board.js'>
<link rel='modulepreload' href='./src/game.js'>
<link rel='modulepreload' href='./src/sound-effects.js'>
<link rel='modulepreload' href='./src/ai-worker.js'>
<link rel='modulepreload' href='./src/ai.js'>
<title>Connect N</title>
<style>
:root {
color-scheme: dark;
}
body {
margin: 0;
width: 100svw;
height: 100svh;
background: var(--connect-n-app-background-color, #282828);
color: var(--connect-n-app-foreground-color, #e0e0e0);
font-family: system-ui, sans-serif;
font-size: 16px;
}
connect-n-app {
width: 100%;
height: 100%;
}
connect-n-app::part(container) {
padding-top: env(safe-area-inset-top);
padding-bottom: env(safe-area-inset-bottom);
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
}
connect-n-app::part(board) {
overflow-clip-margin: env(safe-area-inset-bottom);
}
noscript,
[role='alert']:not([hidden]) {
display: grid;
place-items: center;
box-sizing: border-box;
width: 100%;
height: 100%;
padding: 1em;
text-align: center;
}
</style>
<script type='module'>
try {
navigator.serviceWorker?.register('./service-worker.js', { type: 'module' });
}
finally {
try {
const { ConnectNApp } = await import('./src/app.js');
const app = new ConnectNApp();
document.body.append(app);
app.board.focus();
}
catch (error) {
document.querySelector("[role='alert']").hidden = false;
throw error;
}
}
</script>
</head>
<body>
<noscript>You need to enable JavaScript to run Connect N.</noscript>
<div role='alert' hidden>Your browser does not support features required by Connect N.</div>
</body>
</html>