-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
77 lines (65 loc) · 2.2 KB
/
index.html
File metadata and controls
77 lines (65 loc) · 2.2 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
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE HTML>
<html lang="es">
<head>
<meta name="author" content="Sergio Fernandez-Miranda Longo" />
<meta name="description" content="Indice de la pagina de MotoGP" />
<meta name="keywords" content="MotoGP, indice, index" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8" />
<title>MotoGP-Indice</title>
<link rel="icon" type="image/x-icon" href="multimedia/favicon.ico"/>
<link rel="stylesheet" type="text/css" href="estilo/estilo.css" />
<link rel="stylesheet" type="text/css" href="estilo/layout.css"/>
</head>
<body>
<header>
<h1><a href="index.html">MotoGP Desktop</a></h1>
<nav>
<a class="highlight" href="index.html">Inicio</a>
<a href="piloto.html">Piloto</a>
<a href="circuito.html">Circuito</a>
<a href="meteorologia.html">Meteorologia</a>
<a href="clasificaciones.php">Clasificaciones</a>
<a href="juegos.html">Juegos</a>
<a href="ayuda.html">Ayuda</a>
</nav>
</header>
<main>
<h2>Indice de MotoGP Desktop</h2>
<!-- Carrusel de imágenes -->
<article>
<h3>Imágenes del circuito de Circuit of the Americas</h3>
</article>
<!-- Sección de noticias -->
<section>
<h3>Cargando noticias...</h3>
</section>
</main>
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="js/carrusel.js"></script>
<script src="js/noticias.js"></script>
<script>
// Carrusel de imágenes
const carrusel = new Carrusel("Circuit of the Americas");
carrusel.getFotografias().then(data => {
carrusel.procesarJSONFotografias(data);
const article = carrusel.mostrarFotografias();
document.querySelector("main > article").replaceWith(article);
}).catch(error => {
console.error("Error al cargar el carrusel:", error);
});
// Noticias sobre MotoGP
const noticias = new Noticias();
noticias.buscar()
.then(data => {
noticias.procesarInformacion(data);
const $seccionNoticias = noticias.mostrarNoticias();
$("main > section").replaceWith($seccionNoticias);
})
.catch(error => {
console.error("Error al cargar noticias:", error);
$("main > section").html("<h3>Error al cargar noticias</h3><p>No se pudieron cargar las noticias en este momento.</p>");
});
</script>
</body>
</html>