-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.html
More file actions
54 lines (46 loc) · 1.8 KB
/
Copy pathgame.html
File metadata and controls
54 lines (46 loc) · 1.8 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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles.css" />
<link rel="stylesheet" type="text/css" href="toggle.css" />
<title>Trova la spia - Paolo's Game</title>
</head>
<body>
<label>Hai selezionato: <span id="nGiocatori"></span> giocatori</label>
<div class="container" style="padding: 5vh" id="start_title">
<div style="padding: 3vh;"></div>
<h1 id="titleID" class="title">Premi "Nuova partita" per iniziare</h1>
<!--div style="padding: 10vh;"></div-->
</div>
<div class="input-container">
<h2 id="input-text-ID" class="input-text" style="display: none;"></h2>
</div>
<div id="buttons" class="button-container" style="display: none;">
<button onclick="show()">Show</button>
<button onclick="hide()">Hide</button>
</div>
<div id="newGameId" class="button-container">
<button onclick="newGame()">Nuova partita!</button>
</div>
<div class="dark-mode-container">
<label class="dark-mode-toggle" for="darkModeCheckbox">
<input type="checkbox" id="darkModeCheckbox">
<div class="slider round"></div>
<span class="dark-mode-label" id="darkModeLabel">Night</span>
<span class="light-mode-label" id="lightModeLabel">Day</span>
</label>
</div>
<script src="game.js"></script>
<script>
let mode = getQueryStringValue('Mode');
const darkModeCheckbox = document.getElementById("darkModeCheckbox");
if (JSON.parse(mode)) {
document.body.classList.toggle("dark-mode")
darkModeCheckbox.checked = true;
};
darkModeCheckbox.addEventListener("change", () => {
document.body.classList.toggle("dark-mode", darkModeCheckbox.checked);
});
</script>
</body>
</html>