-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
266 lines (246 loc) · 12.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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title>Home - D3Games</title>
<meta content="E-Commerce di videogiochi" name="description">
<meta content="#6e00ee" name="theme-color">
<link href="images/favicon.png" rel="icon" type="image/png"/>
<meta content="height=device-height, width=device-width, initial-scale=1.0, viewport-fit=cover" name="viewport">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-icons.min.css" rel="stylesheet">
<script src="js/bootstrap.bundle.min.js"></script>
<script src="js/jquery-3.6.0.min.js"></script>
<script defer src="js/scripts.js"></script>
<link href="css/footer.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/home.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light py-0" id="header" style="background-color: var(--primary);">
<div class="container-fluid" id="header-container">
<a class="navbar-brand" href="/D3Games">
<img alt="logo" class="d-inline-block align-text-top" height="72" loading="lazy" src="images/favicon.png"
width="72"></a>
<button aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"
class="navbar-toggler"
data-bs-target="#navbarSupportedContent" data-bs-toggle="collapse" type="button">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a aria-current="page" class="nav-link" href="/D3Games"><i class="bi bi-house-fill"></i> Home</a>
</li>
<li class="nav-item dropdown">
<a aria-expanded="false" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#"
id="navbarDropdown0" role="button">
<i class="bi bi-tag-fill"></i> Categorie
</a>
<ul aria-labelledby="navbarDropdown0" class="dropdown-menu">
<li><a class="dropdown-item" href="categoria?c=action-adventure">Action-adventure</a></li>
<li><a class="dropdown-item" href="categoria?c=rpg">RPG</a></li>
<li><a class="dropdown-item" href="categoria?c=platform">Platform</a></li>
<li><a class="dropdown-item" href="categoria?c=sparatutto">Sparatutto</a></li>
<li><a class="dropdown-item" href="categoria?c=sport">Sport</a></li>
<li><a class="dropdown-item" href="categoria?c=guida">Guida</a></li>
<li><a class="dropdown-item" href="categoria?c=picchiaduro">Picchiaduro</a></li>
<li><a class="dropdown-item" href="categoria?c=simulazione">Simulazione</a></li>
<li><a class="dropdown-item" href="categoria?c=strategia">Strategia</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a aria-expanded="false" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#"
id="navbarDropdown1" role="button">
<i class="bi bi-joystick"></i> Piattaforme
</a>
<ul aria-labelledby="navbarDropdown1" class="dropdown-menu">
<li><a class="dropdown-item" href="piattaforma?p=ps5"><i class="bi bi-playstation"></i>
PlayStation 5</a></li>
<li><a class="dropdown-item" href="piattaforma?p=seriesx"><i class="bi bi-xbox"></i> Xbox Series
X|S</a></li>
<li><a class="dropdown-item" href="piattaforma?p=switch"><i class="bi bi-nintendo-switch"></i>
Nintendo Switch</a></li>
<li><a class="dropdown-item" href="piattaforma?p=pc"><i class="bi bi-pc-display"></i> PC</a>
</li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="piattaforma?p=ps4"><i class="bi bi-playstation"></i>
PlayStation 4</a></li>
<li><a class="dropdown-item" href="piattaforma?p=xboxone"><i class="bi bi-xbox"></i> Xbox
One</a></li>
</ul>
</li>
</ul>
<form action="cerca" class="d-flex" onsubmit="return cerca()">
<input aria-label="Search" class="form-control me-2" id="cercaInput" name="q" placeholder="Cerca"
type="search">
<div id="s-res">
<ul id="results"></ul>
</div>
<button class="btn btn-outline-light" id="cercaBtn" type="submit"><i class="bi bi-search"></i></button>
</form>
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item dropdown">
<a aria-expanded="false" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#"
id="navbarDropdown2" role="button">
<i class="bi bi-person-fill"></i> Mario
</a>
<ul aria-labelledby="navbarDropdown2" class="dropdown-menu">
<li><a class="dropdown-item" href="profilo"><i class="bi bi-person-lines-fill"></i> Account</a>
</li>
<li><a class="dropdown-item" href="#"><i class="bi bi-box-arrow-left"></i> Logout</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="carrello"><i class="bi bi-cart-fill"></i> Carrello</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<p class="h1 text-center my-3">Videogiochi in evidenza</p>
<div class="container d-flex justify-content-center align-items-center">
<div class="row my-2" id="featured">
</div>
</div>
<p class="h1 text-center my-3">I più votati</p>
<div class="container d-flex justify-content-center align-items-center">
<div class="row my-2" id="most_voted">
</div>
</div>
<p class="h1 text-center my-3">Categorie più popolari</p>
<div class="container d-flex justify-content-center align-items-center">
<div class="row my-2">
<div class="col-sm my-2 mx-3">
<div class="card text-center categoria" id="action-adventure" style="width: 12rem;">
<img class="card-img-top p-2" loading="lazy" src="images/action.webp">
<div class="card-body">
<h5 class="card-title">Action-adventure<br></h5>
</div>
</div>
</div>
<div class="col-sm my-2 mx-3">
<div class="card text-center categoria" id="rpg" style="width: 12rem;">
<img class="card-img-top p-2" loading="lazy" src="images/rpg.webp">
<div class="card-body">
<h5 class="card-title">RPG<br></h5>
</div>
</div>
</div>
<div class="col-sm my-2 mx-3">
<div class="card text-center categoria" id="sparatutto" style="width: 12rem;">
<img class="card-img-top p-2" loading="lazy" src="images/fps.webp">
<div class="card-body">
<h5 class="card-title">Sparatutto<br></h5>
</div>
</div>
</div>
<div class="col-sm my-2 mx-3">
<div class="card text-center categoria" id="platform" style="width: 12rem;">
<img class="card-img-top p-2" loading="lazy" src="images/platform.webp">
<div class="card-body">
<h5 class="card-title">Platform<br></h5>
</div>
</div>
</div>
</div>
</div>
<p class="h1 text-center my-3">Piattaforme più diffuse</p>
<div class="container d-flex justify-content-center align-items-center">
<div class="row my-2">
<div class="col-sm my-2 mx-3">
<div class="card text-center piattaforma" id="ps5" style="width: 12rem;">
<img class="card-img-top p-2" loading="lazy" src="images/ps5.webp">
<div class="card-body">
<h5 class="card-title">PlayStation 5<br></h5>
</div>
</div>
</div>
<div class="col-sm my-2 mx-3">
<div class="card text-center piattaforma" id="seriesx" style="width: 12rem;">
<img class="card-img-top p-2" loading="lazy" src="images/seriesx.webp">
<div class="card-body">
<h5 class="card-title">Xbox Series X|S<br></h5>
</div>
</div>
</div>
<div class="col-sm my-2 mx-3">
<div class="card text-center piattaforma" id="switch" style="width: 12rem;">
<img class="card-img-top p-2" loading="lazy" src="images/switch.webp">
<div class="card-body">
<h5 class="card-title">Nintendo Switch<br></h5>
</div>
</div>
</div>
<div class="col-sm my-2 mx-3">
<div class="card text-center piattaforma" id="pc" style="width: 12rem;">
<img class="card-img-top p-2" loading="lazy" src="images/pc.webp">
<div class="card-body">
<h5 class="card-title">PC<br></h5>
</div>
</div>
</div>
</div>
</div>
<div class="container text-center my-5">
<h2>Prenotazione</h2>
<p>Non trovi un videogioco? <a href="prenotazione">Effettua una prenotazione</a></p>
</div>
</div>
<script>
$(document).ready(function () {
const featured_ids = [1, 7, 11, 5, 22, 12, 23, 28, 30, 6];
const most_voted_ids = [29, 3, 19, 15, 13];
$.getJSON('assets/games.json', function (data) {
featured_ids.forEach(function (item) {
$('#featured').append(getDivFromGame(data[item - 1]));
});
most_voted_ids.forEach(function (item) {
$('#most_voted').append(getDivFromGame(data[item - 1]));
});
$('.prodotto').click(function () {
window.location.href = 'videogioco?id=' + $(this).attr("id");
});
});
$('.piattaforma').click(function () {
window.location.href = 'piattaforma?p=' + $(this).attr("id");
});
$('.categoria').click(function () {
window.location.href = 'categoria?c=' + $(this).attr("id");
});
});
</script>
<button id="backtotop" onclick="topFunction()" title="Torna su"><i class="bi bi-arrow-bar-up"></i></button>
<footer>
<div class="footer-content">
<table>
<tr>
<td><img id="footerlogo" loading="lazy" src="images/favicon.png"></td>
<td><h3> D3Games</h3></td>
</tr>
</table>
<ul class="socials">
<li><a href="https://github.com/Themko30/G8_Gaming" target="_blank"><i class="bi bi-github" id="gh"></i></a>
</li>
<li><a href="https://www.instagram.com/unisalerno/" target="_blank"><i class="bi bi-instagram" id="ig"></i></a>
</li>
<li><a href="https://twitter.com/unisalerno" target="_blank"><i class="bi bi-twitter" id="tw"></i></a></li>
<li><a href="https://www.youtube.com/channel/UCi3CdtXjmc68QC4uj6xYP4g" target="_blank"><i
class="bi bi-youtube"
id="yt"></i></a>
</li>
<li><a href="https://www.facebook.com/unisalerno" target="_blank"><i class="bi bi-facebook" id="fb"></i></a>
</li>
</ul>
</div>
<div class="footer-bottom">
<p style="margin-bottom: 0.4rem;">Leggi la nostra <a href="privacyPolicy" target="_blank">Privacy Policy</a></p>
<p>Copyright © 2022 D3Games - Tutti i diritti riservati</p>
</div>
</footer>
</body>
</html>