forked from jshazia/minesweeper-2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
168 lines (157 loc) · 6.03 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
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Minesweeper 2.0</title>
<link href="https://fonts.googleapis.com/css?family=Monoton|Orbitron" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="assets/css/styles.css">
<link rel="stylesheet" href="https://oylo.info/css/csshake.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.20.1/moment.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.12.0/firebase.js"></script>
<script type="text/javascript" src="assets/javascript/firebase.js"></script>
<script type="text/javascript" src="assets/javascript/app.js"></script>
</head>
<body background="assets/images/dark-triangles.png" oncontextmenu="return false;" onload="generate_field()">
<div class="container">
<div class="row form-inline">
<div class="col-lg-7 pull-right">
<div class="input-group" id="authenticationElements">
<input type="text" class="form-control" id="loginEmail" placeholder="Email...">
<input type="password" class="form-control" id="loginPassword" placeholder="Password...">
<span class="input-group-btn">
<button type="button" class="btn btn-default" id="signInBtn">Sign In!</button>
<button type="button" class="btn btn-default" id="createAccountBtn">Create Account!</button>
<button type="button" class="btn btn-default" id="logoutBtn">Log Out</button>
</span>
</div>
<p id="wrongLogin"></p>
</div>
</div>
<div class="jumbotron" id="jumbotron2">
<h1 class="display-4 autoflag">Minesweeper 2.0</h1>
<p class="lead"></p>
</div>
<div class="panel panel-default powerups_panel">
<div class="panel-body powerups_body col-lg-12">
<h2 id="timerDisplay"></h2>
<div class="powerups">
<input type="button" value="clear row" class="btn btn-success clear_row" onclick="select_clear('row')">
<input type="button" value="clear column" class="btn btn-success clear_column" onclick="select_clear('column')">
<input type="button" value="reveal bomb" class="btn btn-success reveal_bomb" onclick="reveal_bomb()">
<input type="button" value="add time" class="btn btn-success add_time" id="addTime" onclick="add_time()">
</div>
<h2 class='check_email'></h2>
</div>
</div>
<div class="panel panel-default mine_field_panel">
<div class="panel-body">
<div class="mine_field"></div>
</div>
</div>
<div class="panel panel-default">
<!-- Default panel contents -->
<div class="panel-heading" id="highScores">High Scores</div>
<div class="panel-body">
<!-- Table -->
<table class="table" id="scoreTable">
<tbody>
<thead>
<tr>
<th>Nickname:</th>
<th>Score:</th>
<th>Date:</th>
</tr>
</thead>
</tbody>
</table>
</div>
</div>
</div>
<!-- Game Loss Modal -->
<div class="modal fade" id="lossModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">You Lose!</h4>
</div>
<div class="modal-body">
<div id="gameOverAPI"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="winModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">You Win!</h4>
</div>
<div class="modal-body">
<div id="winAPI"></div>
<div class="input-group">
<input type="text" class="form-control" id="winnerNickname" placeholder="What's Your Nickname?">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="saveWinnerData">Save Your Score!</button>
</div>
</div>
</div>
<!-- login Modal -->
<div class="modal fade" id="loginModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Error</h4>
</div>
<div class="modal-body">
<p>Please enter a valid email and password.</p>
<br>
<p>The password must have at least one number, one lowercase letter, one uppercase letter, and be eight characters long</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- login Modal 2 -->
<div class="modal fade" id="loginModal2" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Error</h4>
</div>
<div class="modal-body">
<p>Please create an account.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</body>
<script>
var numberOfClicks = 0;
$('body').on('mousedown', '.block', function(event) {
numberOfClicks++;
});
</script>
</html>