-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
233 lines (231 loc) · 9.95 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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<!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" />
<title>Who's That Pokémon</title>
<link
href="https://cdnjs.cloudflare.com/ajax/libs/flowbite/1.6.6/flowbite.min.css"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"
/>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="./style/index.css" />
<link rel="stylesheet" href="./style/main.css" />
<link rel="stylesheet" href="./style/guessByIndex.css" />
<script src="./js/pokemon.js"></script>
<script src="./js/index.js" defer></script>
<script src="./js/main.js" defer></script>
<script src="./js/guessFromIndex.js" defer></script>
<script src="./js/game.js" defer></script>
</head>
<body>
<div class="grid relative max-w-4xl mx-auto" id="body">
<div
class="flex flex-col py-3 justify-start items-center sm:gap-2 mx-auto smallWidth min-h-[100dvh]"
>
<div class="flex justify-between sm:justify-center items-center w-full">
<button
data-drawer-target="settings"
data-drawer-toggle="settings"
aria-controls="settings"
type="button"
class="aspect-square w-[44px] border focus:outline-none focus:ring-4 font-medium rounded-lg text-xl bg-gray-800 text-white border-gray-600 hover:bg-gray-700 hover:border-gray-600 focus:ring-gray-700 sm:hidden"
>
<span class="sr-only">Open sidebar</span>
<i class="bi bi-gear-fill"></i>
</button>
<div class="flex flex-col">
<h1 class="font-bold text-xl text-center">Who's That Pokemon?</h1>
<h2 class="font-bold text-base text-center" id="gameMode">
Game Mode
</h2>
</div>
<button
data-drawer-target="stats"
data-drawer-toggle="stats"
data-drawer-placement="right"
aria-controls="stats"
type="button"
class="aspect-square w-[44px] border focus:outline-none focus:ring-4 font-medium rounded-lg text-xl bg-gray-800 text-white hover:bg-gray-700 hover:border-gray-600 focus:ring-gray-700 sm:hidden"
>
<span class="sr-only">Open sidebar</span>
<i class="bi bi-bar-chart-line-fill"></i>
</button>
</div>
<div id="main" class="flex flex-col w-full px-3">
<div class="flex justify-between items-center md:mb-2">
<h1 id="pokeDex" class="text-2xl font-bold"></h1>
<button
type="button"
class="text-sm focus:outline-none focus:ring-4 font-medium rounded-lg px-5 py-2.5 bg-gray-800 text-white hover:bg-gray-700 hover:border-gray-600 focus:ring-gray-700"
onclick="nextGuessFromIndex()"
>
SKIP
</button>
</div>
<div
id="pokeFlex"
class="grid grid-flow-row-dense grid-cols-2 gap-3 lg:grid-cols-3 justify-center items-center place-items-center"
></div>
</div>
</div>
<aside
id="settings"
class="absolute top-0 left-0 z-40 w-64 h-screen transition-transform -translate-x-full sm:translate-x-0"
aria-label="Sidebar"
>
<div
class="h-full px-3 py-4 overflow-y-auto bg-gray-800 sm:bg-transparent"
>
<ul
class="flex flex-col items-center gap-3 font-medium text-white sm:text-black"
>
<h2 class="text-center font-bold text-xl sm:hidden">Settings</h2>
<h3 class="text-center font-bold text-lg">Generation</h3>
<ul
class="roundedDiv w-48 text-sm font-medium border rounded-lg bg-gray-700 text-white"
id="generation"
></ul>
<h3 class="text-center font-bold text-lg">Game Mode</h3>
<ul
class="roundedDiv w-48 text-sm font-medium border rounded-lg bg-gray-700 text-white"
id="gameModeSelector"
>
<li>
<input
type="radio"
id="guessFromIndex"
value="guessFromIndex"
class="hidden peer"
required=""
name="gameMode"
checked
onchange="updateGameMode()"
/>
<label
for="guessFromIndex"
class="bi relative inline-flex items-center justify-between w-full p-2 border-2 cursor-pointer hover:text-gray-300 border-gray-700 peer-checked:text-gray-300 text-gray-400 bg-gray-800 hover:bg-gray-700"
>
<div class="w-full text-base font-bold text-center">
Guess From Index
</div>
</label>
</li>
<li>
<input
type="radio"
id="guessingIndex"
value="guessingIndex"
class="hidden peer"
required=""
name="gameMode"
onchange="updateGameMode()"
/>
<label
for="guessingIndex"
class="bi relative inline-flex items-center justify-between w-full p-2 border-2 cursor-pointer hover:text-gray-300 border-gray-700 peer-checked:text-gray-300 text-gray-400 bg-gray-800 hover:bg-gray-700"
>
<div class="w-full text-base font-bold text-center">
Guessing Index
</div>
</label>
</li>
<!-- <li>
<a
href="./main.html"
class="inline-flex items-center justify-between w-full p-2 bg-white border-3 cursor-pointer hover:text-gray-300 border-gray-700 peer-checked:text-gray-300 text-gray-400 bg-gray-800 hover:bg-gray-700"
>
<div class="w-full text-base font-bold text-center">
Guess By Index
</div>
</a>
</li>
<li>
<a
href="./pokemon.html"
class="bi relative inline-flex items-center justify-between w-full p-2 border-2 cursor-pointer hover:text-gray-300 border-gray-700 peer-checked:text-gray-300 text-gray-400 bg-gray-800 hover:bg-gray-700"
>
<div class="w-full text-base font-bold text-center">
Guess From Index
</div>
</a>
</li> -->
</ul>
</ul>
<!-- <ul class="pt-4 mt-4 space-y-2 font-medium border-t border-gray-700">
<li>hi</li>
</ul> -->
</div>
</aside>
<aside
id="stats"
class="fixed md:absolute top-0 right-0 z-40 w-64 h-screen transition-transform translate-x-full sm:translate-x-0"
aria-label="Sidebar"
>
<div
class="h-full px-3 py-4 overflow-y-auto bg-gray-800 sm:bg-transparent"
>
<ul
class="flex flex-col items-center gap-3 font-medium text-white sm:text-black"
>
<h2 class="text-center font-bold text-xl sm:hidden">Stats</h2>
<h3 class="text-center font-bold text-lg">Score</h3>
<div
class="flex flex-col gap-1 items-center sm:bg-gray-800 bg-slate-700 rounded-lg p-2 w-3/4 text-white"
>
<h3 class="text-2xl font-bold" id="score">0 / 0</h3>
</div>
<h3 class="text-center font-bold text-lg">Streak</h3>
<div
class="flex flex-col gap-1 items-center sm:bg-gray-800 bg-slate-700 rounded-lg p-2 w-3/4 text-white"
>
<h4 class="text-center font-bold text-base">Current</h4>
<h3 class="text-2xl font-bold" id="currentStreak">0</h3>
</div>
<div
class="flex flex-col gap-1 items-center sm:bg-gray-800 bg-slate-700 rounded-lg p-2 w-3/4 text-white"
>
<h4 class="text-center font-bold text-base">Best</h4>
<h3 class="text-xl font-bold" id="bestStreak">0</h3>
</div>
<h3 class="text-center font-bold text-lg">Time</h3>
<div
class="flex flex-col gap-1 items-center sm:bg-gray-800 bg-slate-700 rounded-lg p-2 w-3/4 text-white"
>
<h4 class="text-center font-bold text-base">Previous</h4>
<h3 class="text-2xl font-bold" id="previousTime">-</h3>
</div>
<div
class="flex flex-col gap-1 items-center sm:bg-gray-800 bg-slate-700 rounded-lg p-2 w-3/4 text-white"
>
<h4 class="text-center font-bold text-base">Best</h4>
<h5 class="text-center font-bold text-sm">
( <span id="bestTimePokemon">-</span> )
</h5>
<h3 class="text-2xl font-bold" id="bestTime">0</h3>
</div>
<div
class="flex flex-col gap-1 items-center sm:bg-gray-800 bg-slate-700 rounded-lg p-2 w-3/4 text-white"
>
<h4 class="text-center font-bold text-base">Average</h4>
<h3 class="text-2xl font-bold" id="averageTime">-</h3>
</div>
<button
type="button"
class="text-sm focus:outline-none focus:ring-4 font-medium rounded-lg px-5 py-2.5 sm:bg-gray-800 bg-slate-700 text-white sm:hover:bg-gray-700 sm:hover:border-gray-600 hover:bg-slate-700 hover:border-slate-600 focus:ring-gray-700"
onclick="removeStorage()"
>
TRASH
</button>
</ul>
</div>
</aside>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/flowbite/1.6.6/flowbite.min.js"></script>
</body>
</html>