-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
65 lines (40 loc) · 1.31 KB
/
Copy pathindex.php
File metadata and controls
65 lines (40 loc) · 1.31 KB
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
<?php
require_once "includes/funciones.php";
$videojuegos = obtenerVideojuegos();
include "includes/header.php";
?>
<div class="contenedor-principal">
<h1>Listado de Videojuegos</h1>
<?php if (!empty($videojuegos)): ?>
<div class="contenedor-juegos">
<?php foreach (array_slice($videojuegos, 0, 12) as $juego): ?>
<div class="tarjeta">
<img
src="<?= $juego['thumbnail'] ?>"
alt="Imagen del videojuego <?= $juego['title'] ?>"
>
<h2><?= $juego['title'] ?></h2>
<p>
<strong>Género:</strong>
<?= $juego['genre'] ?>
</p>
<p>
<strong>Plataforma:</strong>
<?= $juego['platform'] ?>
</p>
<p>
<strong>Fecha:</strong>
<?= $juego['release_date'] ?>
</p>
</div>
<?php endforeach; ?>
</div>
<?php else: ?>
<div class="mensaje-error">
No se pudieron cargar los videojuegos.
</div>
<?php endif; ?>
</div>
<?php
include "includes/footer.php";
?>