-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
72 lines (59 loc) · 1.81 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
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html lang="en" id = "html"></html>
<head>
<link rel="stylesheet" href="CSS/website.css">
<link rel="stylesheet" href="CSS/minesweeper.css">
<title>MineSweeper</title>
</head>
<div id="modal" class="modal">
<div class="modal-content">
<!-- <span class="close">×</span> -->
<div id="modal-content"></div>
</div>
</div>
<div id="alert" class="alert modal">
<div class="alert-content">
<span class="close-alert">×</span>
<div id="alert-content"></div>
</div>
</div>
<script>
boxWidth = 44;
const alertModal = document.getElementById('alert');
const alertMessage = document.getElementById('alert-content');
const closeAlert = document.querySelector('.close-alert');
closeAlert.addEventListener('click', function() {
alertModal.style.display = 'none';
});
window.addEventListener('click', function(event) {
if (event.target == alertModal) {
alertModal.style.display = 'none';
}
});
</script>
<body hidden>
<header></header>
<div id = "content" >
<div id = "top">
<h1 class="header">MineSweeper </h1>
</div>
</div>
<main class= "gameHolder" >
<section class="sectionContainer">
<div id="minesweeperHolder">
<script src = "Scripts/minesweeper.js"> </script>
</div>
</main>
<script>
function link(){
const modal = document.getElementById('modal');
const closeButtons = document.querySelector('.close');
closeButtons.addEventListener('click', function() {
modal.style.display = 'none';
});
}
window.addEventListener("load", link);
</script>
<footer></footer>
</body>
</html>