-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcongratulations.html
51 lines (49 loc) · 2.19 KB
/
congratulations.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
<!DOCTYPE html>
<html>
<head>
<title>Rock Paper Scissor Game</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<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=Abril+Fatface&family=DM+Sans:opsz,wght@9..40,400;9..40,700&family=Inter:wght@400;700&family=Merriweather+Sans:wght@400;502;800&family=Outfit:wght@400;700&family=Poppins:wght@300&family=Roboto:wght@100;300;400;500;700&family=Urbanist:ital@0;1&family=Work+Sans:wght@400;504;801&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="./style.css" class="rel" />
</head>
<body>
<div class="winner-page">
<img class="stars" src="./assets/stars.png" alt="stars" />
<img class="trophy" src="./assets/trophy.png" alt="trophy" />
<div class="hurray">HURRAY!!</div>
<div class="won">YOU WON THE GAME</div>
<button id="rules-button">RULES</button>
<div id="rules-popup">
<img
class="Game_Rules"
src="./assets/rules.png"
alt="game rules"
/>
<span class="close-button">×</span>
</div>
<button id="play-again-button" onclick="gamepage()">
PLAY AGAIN
</button>
</div>
<script>
const rulesButton = document.getElementById("rules-button");
const rulesPopup = document.getElementById("rules-popup");
const closeButton = document.querySelector(".close-button");
rulesButton.addEventListener("click", () => {
rulesPopup.style.display = "block";
});
closeButton.addEventListener("click", () => {
rulesPopup.style.display = "none";
});
function gamepage() {
window.location.href = "index.html";
}
</script>
</body>
</html>