-
Notifications
You must be signed in to change notification settings - Fork 0
/
block_impact.html
137 lines (117 loc) · 5.4 KB
/
block_impact.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
129
130
131
132
133
134
135
136
137
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="public/img/favicon.png" type="image/x-icon">
<title>Block Impact</title>
<link rel="stylesheet" href="public/css/header_games.css">
<link rel="stylesheet" href="public/css/block_impact.css">
</head>
<body>
<header>
<a href="index.html" id="home">
<ion-icon name="home"></ion-icon>
<p>Home</p>
</a>
<a href="https://chat2-kauamoreno2005.b4a.run/" target="_blank" id="chat">
<ion-icon name="chatbox-ellipses"></ion-icon>
<p>Sala de Bate-Papo</p>
</a>
</header>
<div class="row">
<main>
<div class="tela_cronom">
<canvas id="tela">
O seu navegador não suporta Canvas
</canvas>
<div id="cronometro">0</div>
<div id="gameOver">Game Over</div>
</div>
</main>
<aside>
<div class="ponto_record">
<div id="recorde">Recorde: 0</div>
<div class="pontos">Pontos: 0</div>
<div class="dinheiro">
<img width="50px" src="public/img/block_impact/coin.webp" alt="Coin">
<div class="quantia">x 0</div>
</div>
</div>
<div class="dropdown">
<button class="dropdown-btn">
<p>Selecione o seu carro</p>
<ion-icon id="shop" name="storefront-sharp"></ion-icon>
</button>
<div class="dropdown-content">
<div class="color-row">
<div onclick="mudarCor('red', 'red')" id="red" class="color-box">
<p class="txt"></p>
<ion-icon id="check" name="checkmark-circle-outline"></ion-icon>
</div>
<div onclick="mudarCor('green', 'green')" id="green" class="color-box">
<p class="txt"></p>
<ion-icon id="check" name="checkmark-circle-outline"></ion-icon>
</div>
</div>
<div class="color-row">
<div onclick="mudarCor('blue', 'blue')" id="blue" class="color-box">
<p class="txt"></p>
<ion-icon id="check" name="checkmark-circle-outline"></ion-icon>
</div>
<div onclick="mudarCor('yellow', 'yellow')" id="yellow" class="color-box">
<p class="txt"></p>
<ion-icon id="check" name="checkmark-circle-outline"></ion-icon>
</div>
</div>
<div class="color-row">
<div onclick="mudarCor('orange', 'orange')" id="orange" class="color-box">
<p class="txt"></p>
<ion-icon id="check" name="checkmark-circle-outline"></ion-icon>
</div>
<div onclick="mudarCor('purple', 'purple')" id="purple" class="color-box">
<p class="txt"></p>
<ion-icon id="check" name="checkmark-circle-outline"></ion-icon>
</div>
</div>
</div>
</div>
<button onclick="iniciarAtraso()" id="iniciarBtn">Iniciar</button>
</aside>
</div>
<div vw class="enabled">
<div vw-access-button class="active"></div>
<div vw-plugin-wrapper>
<div class="vw-plugin-top-wrapper"></div>
</div>
</div>
<script src="https://vlibras.gov.br/app/vlibras-plugin.js"></script>
<script>
new window.VLibras.Widget('https://vlibras.gov.br/app');
</script>
<!-- IONICONS ------------------------------------------------------------------------------------->
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script src="public/js/block_impact.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const dropdownBtn = document.querySelector('.dropdown-btn');
const dropdownContent = document.querySelector('.dropdown-content');
// Abre o dropdown e fecha quando o botão é clicado
dropdownBtn.addEventListener('click', function () {
dropdownContent.style.display = dropdownContent.style.display === 'none' ? 'block' : 'none';
});
// Fecha o dropdown quando ocorre um clique fora dele
document.addEventListener('click', function (event) {
// Obtendo a referencia do elemento
const targetElement = event.target;
if (!dropdownBtn.contains(targetElement) && !dropdownContent.contains(targetElement)) {
dropdownContent.style.display = 'none';
}
});
});
</script>
</body>
</html>