-
Notifications
You must be signed in to change notification settings - Fork 0
/
ranking.html
97 lines (89 loc) · 3.38 KB
/
ranking.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pokemon Game - Simulator</title>
<link rel="icon" type="image/x-icon" href="./assets/images/pokeball.ico">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header class="contenedor">
<nav class="menu ">
<ul class="menu-items">
<li><a href="#"> Como Jugar </a></li>
<li class="current"><a href="#"> Ranking </a></li>
<li><a href="presentacion.html">Autor</a></li>
</ul>
<div class="view-menu">
<a href="./" class="brand">
<img src="./assets/images/pokeball.ico" alt="">
PKMN Battle
</a>
<button class="menu-btn" aria-label="Toggle Menu">
<i class="bi bi-list"></i>
</button>
</div>
</nav>
</header>
<main class="contenedor">
<hgroup>
<h2 class="titulo">Ranking</h2>
<h5 class="subtitulo">Hall OF Fame</h5>
</hgroup>
<div class="ranking-container">
<table class="ranking">
<thead>
<tr>
<th>Entrenador</th>
<th>Pokemon</th>
<th>Victorias</th>
</tr>
</thead>
<tbody>
<tr>
<td>Ash</td>
<td>Pikachu</td>
<td>15</td>
</tr>
<tr>
<td>Red </td>
<td>Charmander</td>
<td>12</td>
</tr>
<tr>
<td>Giovanny</td>
<td>Mew</td>
<td>10</td>
</tr>
<tr id="infoJugador" >
<td><span id="nombreJugador"></span></td>
<td><span id="pokemonJugador"></span></td>
<td><span id="victoriasJugador"></span></td>
</tr>
</tbody>
</table>
</div>
<div class="margin-y txt-center">
<h2>Récord Actual</h2>
<p>Récord: <span id="recordActual"></span></p>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const infoJugador = JSON.parse(localStorage.getItem('infoJugador')) || {};
const recordActual = localStorage.getItem('recordDeBatallas') || 0;
document.getElementById('nombreJugador').textContent = infoJugador.nombre || 'N/A';
document.getElementById('pokemonJugador').textContent = infoJugador.pokemon || 'N/A';
document.getElementById('victoriasJugador').textContent = infoJugador.victorias || 0;
document.getElementById('recordActual').textContent = recordActual;
});
</script>
</main>
<footer>
<p class="fw-bold">©️ 2024</p>
</footer>
<script src="app.js"></script>
</body>
</html>