-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
128 lines (115 loc) · 2.88 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Minefield</title>
<style>
html,
body {
margin: 0;
padding: 0;
overflow: hidden;
background-color: #0f0f0f;
touch-action: none;
}
img,
canvas {
image-rendering: pixelated;
image-rendering: -moz-crisp-edges;
image-rendering: -o-crisp-edges;
image-rendering: optimize-contrast;
-ms-interpolation-mode: nearest-neighbor;
}
canvas,
.ui {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@font-face {
font-family: "silkscreen";
src: url("../assets/fonts/silkscreen.ttf") format("truetype");
}
.container {
display: flex;
flex-direction: column;
align-items: flex-start;
position: absolute;
top: 2px;
left: 2px;
}
.ui {
font-family: "silkscreen";
font-size: 16px;
background-color: #292929;
padding: 2px;
color: lightgray;
zoom: 2;
}
.menubutton {
width: 3em;
height: 3em;
border: 2px solid darkgray;
}
.menubutton > img {
image-rendering: pixelated;
width: 100%;
filter: brightness(2);
}
.menu {
display: none;
border: 2px solid darkgray;
}
.menu button {
font-family: "silkscreen";
font-size: 16px;
background-color: Transparent;
padding: 2px;
color: lightgray;
}
a {
color: dodgerblue;
}
#score {
display: inline;
}
p {
margin: 0.2em 0;
}
hr {
border: 0;
height: 0;
border-top: 1px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
</style>
</head>
<body>
<div class="container">
<button onclick="toggleMenu()" class="menubutton ui">
<img alt="menu button" id="menubutton" src="/menubutton.png" />
</button>
<div class="menu ui" id="menu">
<div><a href="https://discord.gg/XzpSVxx">Discord</a></div>
<div>
<a href="https://github.com/Zikoat/infinite-minesweeper"
>Source code</a
>
</div>
<!-- todo add settings -->
<div>Score:<span id="score"></span></div>
<div>
<button onclick="restart()">restart</button><br />
<button onclick="toggleFullscreen()">Toggle Fullscreen</button>
</div>
<hr />
<div>Zoom: Ctrl +</div>
<div>Keyboard controls:<br />arrow keys and z/x</div>
</div>
</div>
<script src="./src/index.ts" async type="module"></script>
</body>
</html>