-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
244 lines (219 loc) · 11.5 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
234
235
236
237
238
239
240
241
242
243
244
<!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="shortcut icon" href="img/pokeball.png" type="image/x-icon">
<title>Pokédex</title>
<script src="script.js"> </script>
<script src="data.js"> </script>
<script src="favorites-and-search.js"></script>
<link rel="stylesheet" href="style.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"></script>
</head>
<body onload="loadAndRender(24)">
<div class=" container-lg text-center ">
<!-- header -->
<div class="container-lg d-flex justify-content-between align-items-center">
<img id="logo" src="./img/pokemon.png">
<!-- search field is moved to an extra line for mobile -->
<div class="input-group mx-5 mobile-none ">
<input type="text" class="form-control" placeholder="Nummer oder englischer Name"
data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-trigger="hover"
title="Suche dein Lieblings-Pokémon über seine Nummer oder seinen englischen Namen. Bei schon geladenen Pokemon reicht auch ein Teil des Namens."
id="searchField" onkeydown="keydown(event)">
<button id="search-button" class="btn btn-outline btn-pokeblue" type="button"
onclick="findPokemon('desktop')">Suchen</button>
</div>
<img id="heart-blue" src="./img/heart-blue-outline.png" alt="Favoriten anzeigen" title="Favoriten anzeigen"
onclick="showFavorites()">
</div>
<!-- extra line for search field mobile -->
<div class="container-lg d-flex px-4 my-2 ">
<div class=" input-group mobile-only ">
<input type="text" class="form-control" placeholder="Nummer oder englischer Name"
data-bs-toggle="tooltip" data-bs-placement="bottom"
title="Suche dein Lieblings-Pokémon über seine Nummer oder seinen englischen Namen. Bei schon geladenen Pokemon reicht auch ein Teil des Namens."
id="searchField-mobile" onkeydown="keydown">
<button id="search-button" class="btn btn-outline btn-pokeblue" type="button"
onclick="findPokemon('mobile')">Suchen</button>
</div>
</div>
<div id="error-toast" class="toast position-fixed top-0 start-50 translate-middle-x m-5 p-3" role="alert" aria-live="assertive" aria-atomic="true">
<div class="d-flex">
<div id="toast-message" class="toast-body">
</div>
<button type="button" class="btn-close me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
</div>
<!-- small card area -->
<div id="small-cards" class=" container-lg p-0 d-flex flex-wrap justify-content-center">
</div>
<!-- footer -->
<div class="d-flex justify-content-between">
<button id="about-button" type="button" class="btn btn-pokeblue my-4 py-2 px-4" data-bs-toggle="modal"
data-bs-target="#legalModal"> About
</button>
<button id="footer-button" type="button" class="btn btn-pokeblue my-4 py-2 px-4 disabled"
onclick="loadNext(10)">
Pokémon sind unterwegs
</button>
</div>
</div>
<!-- modal for legal notice -->
<div class="modal fade" id="legalModal" tabindex="-1" aria-labelledby="legalModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="legalModalLabel">Impressum</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
</button>
</div>
<div class="modal-body">
<p>Angaben gemäß § 5 TMG</p>
<p>Sabine Detering <br>
Heideweg 14A<br>
76149 Karlsruhe <br>
</p>
<p> <strong>Vertreten durch: </strong><br>
Sabine Detering<br>
</p>
<p><strong>Kontakt:</strong> <br>
Telefon: 0152-53458810<br>
E-Mail: <a href='mailto:[email protected]'>[email protected]</a><br>
</p>
<br>
<p> Impressum vom <a href="https://www.impressum-generator.de">Impressum Generator</a> der <a
href="https://www.kanzlei-hasselbach.de/">Kanzlei Hasselbach, Rechtsanwälte für Arbeitsrecht und
Familienrecht</a>
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-pokeblue" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- settings for single card view -->
<div id="blur" class="d-none" onclick="closeBigCard()">
<div id="big-card" class="container-lg p-0">
<!-- colored part -->
<div id="big-card-upper" class="container-lg p-4 m-p-2" onclick="event.stopPropagation()">
<div class="container-lg d-flex justify-content-center mb-2">
<img src="./img/close-big.png" onclick="closeBigCard()">
</div>
<div id="nav" class="container-lg d-flex justify-content-between">
<img id="arrow-left" src="./img/arrow-left.png">
<img id="arrow-right" src="./img/arrow-right.png">
</div>
<!-- header contains name,id,types, picture -->
<div id="header" class="container-lg mt-4">
</div>
</div>
<!-- white part -->
<div id="big-card-lower" class="container-lg p-4 m-p-2" onclick="event.stopPropagation()">
<!-- info sections on tabs -->
<div id="info-cont" class="container-lg ">
<!-- tab links -->
<ul class="nav nav-fill nav-pills mb-2" role="tablist">
<li class="nav-item " role="presentation">
<button class="nav-link active overflow-hidden" id="about-tab" onclick="changeTabColor()"
data-bs-toggle="tab" data-bs-target="#about" type="button" role="tab"
aria-controls="about" aria-selected="true">About</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="base-tab" onclick="changeTabColor()" data-bs-toggle="tab"
data-bs-target="#base" type="button" role="tab" aria-controls="base"
aria-selected="false">Base Stats</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="moves-tab" onclick="changeTabColor()" data-bs-toggle="tab"
data-bs-target="#moves" type="button" role="tab" aria-controls="moves"
aria-selected="false">Moves</button>
</li>
</ul>
<!-- tabs -->
<div id="tab-content" class="tab-content">
<!-- tab: about -->
<div class="tab-pane fade show active" id="about" role="tabpanel" aria-labelledby="about-tab">
<table class="table align-middle">
<tr>
<td>Species</td>
<td id='species'></td>
</tr>
<tr>
<td>Height</td>
<td id='height'></td>
</tr>
<tr>
<td>Weight</td>
<td id='weight'></td>
</tr>
<tr>
<td>Abilities</td>
<td id='abilities'></td>
</tr>
</table>
</div>
<!-- tab: base stats -->
<div class="tab-pane fade overflow-auto" id="base" role="tabpanel" aria-labelledby="base-tab">
<table class="table align-middle">
<tr>
<td>HP</td>
<td id='hp'></td>
</tr>
<tr>
<td>Attack</td>
<td id='attack'></td>
</tr>
<tr>
<td>Defense</td>
<td id='defense'></td>
</tr>
<tr>
<td>Special Attack</td>
<td id='sp-attack'></td>
</tr>
<tr>
<td>Special Defense</td>
<td id='sp-defense'></td>
</tr>
<tr>
<td>Speed</td>
<td id='speed'></td>
</tr>
<tfoot>
<tr>
<td>Total</td>
<td id='total'></td>
</tr>
<tr>
<td>Average</td>
<td id='avg'></td>
</tr>
</tfoot>
</table>
</div>
<!-- tab: moves -->
<div class="tab-pane fade d-flex flex-wrap overflow-auto" id="moves" role="tabpanel"
aria-labelledby="moves-tab">
moves</div>
</div>
</div>
</div>
</div>
</div>
<!-- Initialize tooltips-->
<script>
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
})
</script>
</body>
</html>