-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
96 lines (93 loc) · 3.78 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="icons/any.svg" />
<link rel="apple-touch-icon" sizes="any" href="icons/square.svg" />
<link rel="apple-touch-icon" sizes="120x120" href="icons/square-120.png" />
<link rel="apple-touch-icon" sizes="180x180" href="icons/square-180.png" />
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff" />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#121212" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<meta name="color-scheme" content="dark light" />
<title><%= TITLE %></title>
<meta name="description" content="<%= DESCRIPTION %>" />
<meta name="keywords" content="Othello, Reversi, game" />
<meta property="og:title" content="<%= TITLE %>" />
<meta property="og:description" content="<%= DESCRIPTION %>" />
<meta property="og:type" content="game" />
<meta property="og:url" content="<%= BASE_URL %>" />
<meta property="og:image" content="<%= BASE_URL %>/screenshots/og.jpg" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="<%= BASE_URL %>/screenshots/twitter.webp" />
<link rel="author" href="https://github.com/nstringham/othello-web-app/graphs/contributors" />
<link rel="license" href="https://github.com/nstringham/othello-web-app/blob/main/LICENSE" />
<script>
document.documentElement.style.cssText = localStorage.getItem("theme-styles");
document.documentElement.classList.toggle("updating", sessionStorage.getItem("updating"));
</script>
<link rel="stylesheet" href="/src/style.css" />
<script type="module" src="/src/main.ts"></script>
<% if ( COMMAND == "build") { %>
<link rel="prefetch" href="/rust-othello/pkg/rust_othello_bg.wasm" />
<% } %>
</head>
<body>
<span id="lcp" aria-hidden="true">Othello</span>
<main id="board">
<% for (let i = 0; i < 64; i++) { %>
<button class="cell <%= i == 27 || i == 36 ? 'white' : i == 28 || i == 35 ? 'black' : '' %>"></button>
<% } %>
</main>
<button id="settings-button" class="icon-button">
<svg viewBox="0 0 24 24">
<title>Settings</title>
<path fill="currentcolor" d="<%- mdiCog %>" />
</svg>
</button>
<dialog id="settings">
<h1>Settings</h1>
<div class="body">
<label id="difficulty">
<span class="label">Difficulty</span>
<output id="difficulty-output"></output>
<input id="difficulty-input" type="range" min="0" max="4" step="1" />
</label>
<label id="enable-hints">
<span class="label">Show Hints</span>
<input id="enable-hints-input" type="checkbox" />
</label>
<div id="color-theme">
<span class="label">Color Theme</span>
<output id="theme-output"></output>
<theme-selector></theme-selector>
</div>
</div>
<button id="close-settings" class="icon-button">
<svg viewBox="0 0 24 24">
<title>Close</title>
<path fill="currentcolor" d="<%- mdiClose %>" />
</svg>
</button>
</dialog>
<dialog id="game-over">
<h1 class="title"></h1>
<p class="body"></p>
<div class="buttons">
<button class="ok">Ok</button>
</div>
</dialog>
<div id="toast-container"></div>
<template id="toast-template">
<div role="alert" class="toast">
<snap class="text"></snap>
</div>
</template>
<button id="new-game" class="fab icon-button">
<svg viewBox="0 0 24 24">
<path fill="currentcolor" d="<%- mdiReplay %>" />
</svg>
<span>New Game</span>
</button>
</body>
</html>