-
Notifications
You must be signed in to change notification settings - Fork 0
/
gamepage.html
121 lines (117 loc) · 5.28 KB
/
gamepage.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
<!DOCTYPE html>
<html lang="en">
<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="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<title>WD101</title>
<style>
body{ /*Styling background*/
margin: 0;
overflow: hidden;
background: url('Images/gamebg.png');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
.fire{ /*Styling fire at the bottom of the page*/
position: absolute;
top: 325px;
}
.bonus{ /*Styling the Key*/
width: 150px;
position: relative;
top:-400px;
left: 1100px;
}
.lock{ /*Styling the lock*/
position: relative;
top:-290px;
left: -150px;
}
#won{ /*Modal box after won*/
margin-top: 150px;
}
.modal-header{ /*Styling header of modal box*/
text-align: center;
font-weight: 700;
font: 1.2rem sans-serif;
margin-left: 180px;
}
.modal-body p{ /*Styling body of modal box*/
text-align: center;
font-weight: 700;
font: 1.2rem sans-serif;
}
.modal-body button{ /*Styling body of modal button*/
float: right;
}
</style>
</head>
<body>
<canvas></canvas>
<img src="Images/key.gif" class="bonus" id = "key"> <!-- Key gif-->
<img src="Images/lock.png" id = "lock" width="80px" class="lock"> <!-- Lock image-->
<img src="Images/fire.gif" class="fire" style="position:absolute;left:-150px;" > <!-- Fire gif-->
<img src="Images/fire.gif" class="fire" style="position:absolute;left:10px;" >
<img src="Images/fire.gif" class="fire" style="position:absolute;left:150px;" >
<img src="Images/fire.gif" class="fire" style="position:absolute;left:300px;" >
<img src="Images/fire.gif" class="fire" style="position:absolute;left:450px;" >
<img src="Images/fire.gif" class="fire" style="position:absolute;left:600px;" >
<img src="Images/fire.gif" class="fire" style="position:absolute;left:750px;" >
<img src="Images/fire.gif" class="fire" style="position:absolute;left:900px;" >
<span id="score" class="score"></span>
<script src="gamepage.js" src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <!-- Linking Javascript-->
<div id="won" class="modal fade"> <!-- Modal box after won-->
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<span><img src = "Images/won.jpg" width="40px"></span>
<span><img src = "Images/won.jpg" width="40px"></span>
<span><img src = "Images/won.jpg" width="40px"></span>
<button type="button" id = "wonclose" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<p>You have been successfully unlocked!</p>
<button type="submit" id = "stopplaying" class="btn btn-primary">Stop Playing</button>
</div>
</div>
</div>
</div>
</div>
<div id="lose" class="modal fade"> <!-- Modal box after lose-->
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<span><img src = "Images/lose.png" width="40px"></span>
<span><img src = "Images/lose.png" width="40px"></span>
<span><img src = "Images/lose.png" width="40px"></span>
<button type="button" class="close" id = "loseclose" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<p>You Lost! <a href = "#" onclick="window.location.reload(true)">Try again</a></p>
</div>
</div>
</div>
</div>
<div id="singlestar" class="modal fade"> <!-- Modal box after single star-->
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<span><img src = "Images/won.jpg" width="40px"></span>
<span><img src = "Images/lose.png" width="40px"></span>
<span><img src = "Images/lose.png" width="40px"></span>
<button type="button" class="close" id = "singlestarclose" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<p>You Lost! Lock cannot open without key! <a href = "#" onclick="window.location.reload(true)">Try again</a></p>
</div>
</div>
</div>
</div>
</body>
</html>