forked from WhoaWhoa/decrypto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
218 lines (204 loc) · 8.38 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="decrypto.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js" integrity="sha256-obZACiHd7gkOk9iIL/pimWMTJ4W/pBsKu+oZnSeBIek=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/nosleep/0.6.0/NoSleep.min.js" integrity="sha256-8gSB9ESo2/0hMlNuROxLSbZhQI6Enq/cMOPhiQO17bc=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/screenfull@4.0.0/dist/screenfull.min.js"></script>
<script src="decrypto.js"></script>
<title>Decrypto</title>
</head>
<body class="bg-dark">
<div class="container-fluid my-5">
<div class="container-fluid">
<div class="row">
<div class="col-8 bg-info">
<p><h3>Decrypto</h3></p>
</div>
<div class="col-4">
<button type="button" class="btn-lg btn-primary align-baseline float-right my-3" data-toggle="modal" data-target="#newGameModal">
New Game
</button>
</div>
</div>
</div>
<div class="container-fluid my-5">
<div class="row bg-primary">
<div class="col-3">
<div class="p-3 cluenumber">
1
</div>
</div>
<div class="col-9">
<div class="p-3 cluebody" id="word0">
?
</div>
</div>
</div>
<div class="row bg-warning">
<div class="col-3">
<div class="p-3 cluenumber">
2
</div>
</div>
<div class="col-9">
<div class="p-3 cluebody" id="word1">
?
</div>
</div>
</div>
<div class="row bg-primary">
<div class="col-3">
<div class="p-3 cluenumber">
3
</div>
</div>
<div class="col-9">
<div class="p-3 cluebody" id="word2">
?
</div>
</div>
</div>
<div class="row bg-warning">
<div class="col-3">
<div class="p-3 cluenumber">
4
</div>
</div>
<div class="col-9">
<div class="p-3 cluebody" id="word3">
?
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-6">
<div class="float-left">
<div class="dropdown">
<button class="btn btn-primary btn-lg dropdown-toggle my-3" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Code
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#codeModal" id="revealCodeButton" style:"display:none">Reveal code</a>
<a class="dropdown-item" href="#" onclick="generateCode()">Generate new code</a>
</div>
</div>
</div>
</div>
<div class="col-6">
<div class="float-right">
<button class="btn btn-primary btn-lg my-3" type="button" id="fullScreenButton" onclick="toggleFullScreen()">
<i class="fas fa-expand-arrows-alt" id="enableFullScreen"></i>
<i class="fas fa-compress" style="display:none" id="disableFullScreen"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="newGameModal" tabindex="-1" role="dialog" aria-labelledby="newGameModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="newGameModalLabel">New Game</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
</button>
</div>
<div class="modal-body">
Do you want to start a new game?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal" id="newGameModalCancelButton">Cancel</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="startNewGame()">Start New Game</button>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="disableScreenLockModal" tabindex="-1" role="dialog" aria-labelledby="disableScreenLockModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="disableScreenLockModalLabel">Disable Screen Lock?</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
</button>
</div>
<div class="modal-body">
Do you want to keep the screen on while the game is in progress?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal" id="newGameModalCancelButton">No</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="disableScreenLock()">Yes (recommended)</button>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="codeModal" tabindex="-1" role="dialog" aria-labelledby="codeModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="codeModalLongTitle">Code</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-4">
<div class="card">
<div class="body">
<div class="codebody bg-info" id="code0">
</div>
</div>
</div>
</div>
<div class="col-4">
<div class="card">
<div class="body">
<div class="codebody bg-info" id="code1">
</div>
</div>
</div>
</div>
<div class="col-4">
<div class="card">
<div class="body">
<div class="codebody bg-info" id="code2">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
initialize();
});
</script>
</body>
</html>