-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
65 lines (65 loc) · 2.16 KB
/
Copy pathindex.html
File metadata and controls
65 lines (65 loc) · 2.16 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>Emblem Tactics – Roguelike TRPG</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
/* html/body are pinned to exactly the visible viewport (not just
overflow:hidden) — on mobile Safari, `100vh` alone measures the
*largest* viewport (address bar collapsed), so the page can end up
taller than what's actually visible and silently scroll a few
pixels on load. That scroll offset is invisible on the map-filling
gameplay screen but very obvious on the title screen, where the
canvas is a small letterboxed rectangle that then reads as
"not centered". `position: fixed` + 100% makes scrolling impossible
regardless of which viewport height the browser measured. */
html, body {
position: fixed;
inset: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
body {
background: #0a0a1a;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-family: 'Press Start 2P', monospace;
color: #e8e8e8;
}
#game-container {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
touch-action: none;
}
canvas {
display: block;
position: absolute;
left: 0;
top: 0;
image-rendering: pixelated;
image-rendering: crisp-edges;
cursor: pointer;
touch-action: none;
}
</style>
</head>
<body>
<div id="game-container">
<canvas id="gameCanvas"></canvas>
</div>
<script type="module" src="js/game.js"></script>
</body>
</html>