-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
60 lines (54 loc) · 3.64 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
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<title>Rafael's Snake Game</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="utf-8">
<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=Chakra+Petch:wght@700&family=Red+Hat+Display:[email protected]&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./index.css">
</head>
<body class="hide-game">
<h1>SNAKE GAME</h1>
<main class="flex-wrapper">
<div class="console">
<div class="canvas-wrapper">
<span data-js="score-placeholder" class="score-placeholder">0</span>
<canvas data-js="canvas" width="480" height="300" role="presentation"></canvas>
<div data-js="begin-game-screen" class="canvas-wrapper__begin-game canvas-wrapper__begin-game--active">
<button data-js="begin-game-button">COMEÇAR</button>
</div>
<div data-js="game-over-screen" class="canvas-wrapper__game-over">
<p>GAME OVER</p>
<button data-js="restart-game-button">RECOMEÇAR</button>
</div>
</div>
<div class="controls">
<button data-js="button" title="ir para cima" data-key="ArrowUp" class="controls__top">
<div>
<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 -960 960 960" width="40px" fill="#fff" style="transform: rotate(-90deg) translate(2px, 1px);"><link xmlns="" type="text/css" id="dark-mode" rel="stylesheet" href=""/><style xmlns="" type="text/css" id="dark-mode-custom-style"/><path d="m309.67-81.33-61-61.67L587-481.33 248.67-819.67l61-61.66 400 400-400 400Z"/></svg>
</div>
</button>
<button data-js="button" title="ir para direita" data-key="ArrowRight" class="controls__right">
<div>
<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 -960 960 960" width="40px" fill="#fff" style="transform: translate(2px, -2px);"><link xmlns="" type="text/css" id="dark-mode" rel="stylesheet" href=""/><style xmlns="" type="text/css" id="dark-mode-custom-style"/><path d="m309.67-81.33-61-61.67L587-481.33 248.67-819.67l61-61.66 400 400-400 400Z"/></svg>
</div>
</button>
<button data-js="button" title="ir para baixo" data-key="ArrowDown" class="controls__bottom">
<div>
<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 -960 960 960" width="40px" fill="#fff" style="transform: rotate(90deg) translateY(1px);"><link xmlns="" type="text/css" id="dark-mode" rel="stylesheet" href=""/><style xmlns="" type="text/css" id="dark-mode-custom-style"/><path d="m309.67-81.33-61-61.67L587-481.33 248.67-819.67l61-61.66 400 400-400 400Z"/></svg>
</div>
</button>
<button data-js="button" title="ir para esquerda" data-key="ArrowLeft" class="controls__left">
<div>
<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 -960 960 960" width="40px" fill="#fff" style="transform: rotate(180deg) translate(2px, 2px);"><link xmlns="" type="text/css" id="dark-mode" rel="stylesheet" href=""/><style xmlns="" type="text/css" id="dark-mode-custom-style"/><path d="m309.67-81.33-61-61.67L587-481.33 248.67-819.67l61-61.66 400 400-400 400Z"/></svg>
</div>
</button>
</div>
</div>
<p data-js="game-tip" class="game-tip game-tip--active">Aperte <span class="game-tip__key">espaço</span> para iniciar</p>
</main>
<script src="game.js" defer></script>
</body>
</html>