-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
135 lines (117 loc) · 4.51 KB
/
index.html
File metadata and controls
135 lines (117 loc) · 4.51 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
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
<!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<title>M4103C-Projet-JS - Recherche d'offres d'emploi</title>
<meta charset="utf-8">
<link rel="shortcut icon" type="image/x-icon" href="favicon.png">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Recherche de Pokémon</h1>
<p id="explication">Cette page permet de rechercher des pokémons via l'API publique de <a href="https://pokeapi.co/" target="_blank">pokeapi.co</a>.<br>
Saisir le nom d'un pokémon <strong>en anglais</strong> (Exemple: <a href="#" onclick="useFavorite('Infernape')">Infernape</a>, <a href="#" onclick="useFavorite('Pikachu')">Pikachu</a>, <a href="#" onclick="useFavorite('Arceus')">Arceus</a>) pour rechercher les informations correspondantes, et enregistrer vos recherches favorites pour les retrouver facilement.</p>
</header>
<hr>
<template id="templateFav">
<li>
<span title="Cliquer pour relancer la recherche"></span>
<img src="images/croix.svg" alt="Icone pour supprimer le favori" width=15 title="Cliquer pour supprimer le favori">
</li>
</template>
<template id="templateType">
<span class="type"></span>
</template>
<main id="conteneur">
<!-- Section de recherche (avec résultats) -->
<section id="section-recherche">
<div id="bloc-recherche">
<!-- Champ de recherche -->
<input type="text" placeholder="Que cherchez-vous ?" id="textInput"/>
<!-- Boutons -->
<button id="btn-lancer-recherche" type="button"
class="btn_clicable" title="Lancer la recherche" onclick="recherche()">
<!-- Icone provenant de flaticon.com -->
<img src="images/loupe.svg" alt="Loupe pour recherche" width=22 >
</button>
<button id="btn-favoris" type="button" disabled
title="Ajouter la recherche aux favoris">
<!-- Icone étoile vide => Recherche pas en favoris -->
<img src="images/etoile-vide.svg" alt="Etoile vide" width=22 >
<!-- Icone étoile pleine => Recherche en favoris -->
<img src="images/etoile-pleine.svg" alt="Etoile pleine" width=22 >
<!-- (Icones provenant de flaticon.com) -->
</button>
</div>
<div id="bloc-gif-attente">
<img src='images/attente-ajax.gif' alt="GIF Attente de résultats" width=50 />
</div>
<div id="bloc-resultats">
<p class="info-vide">( ∅ Aucun Pokémon trouvé )</p>
<div id="resultat">
<div>
<div id="header">
<h1 id="pkmn_name"></h1>
<h3>, n°<span id="pkmn_id"></span></h3>
</div>
<img id="sprite" src="images/attente-ajax.gif" alt="sprite">
<div>
<h1>Types</h1>
<div id="type_list">
</div>
</div>
</div>
<div class="infos">
<h1>Informations</h1>
<h2 for="info_height">Taille</h2>
<h3 id="info_height"></h3>
<h2 for="info_weight">Poids</h2>
<h3 id="info_weight"></h3>
</div>
<div class="stats">
<h1>Statistiques</h1>
<table>
<tr>
<td><label for="stat_hp">PV</label></td>
<td><progress id="stat_hp" max="255"></progress></td>
</tr>
<tr>
<td><label for="stat_attack">Attaque</label></td>
<td><progress id="stat_attack" max="255"></progress></td>
</tr>
<tr>
<td><label for="stat_defense">Défense</label></td>
<td><progress id="stat_defense" max="255"></progress></td>
</tr>
<tr>
<td><label for="stat_special-attack">Attaque Spé.</label></td>
<td><progress id="stat_special-attack" max="255"></progress></td>
</tr>
<tr>
<td><label for="stat_special-defense">Défense Spé.</label></td>
<td><progress id="stat_special-defense" max="255"></progress></td>
</tr>
<tr>
<td><label for="stat_speed">Vitesse</label></td>
<td><progress id="stat_speed" max="255"></progress></td>
</tr>
</table>
</div>
</div>
</div>
</section>
<!-- Section de séparation (avec la bordure verte) -->
<section id="section-separation"></section>
<!-- Section des recherches favorites -->
<section id="section-favoris">
<h2>Recherches favorites</h2>
<p>Cliquer sur une recherche favorite ci-dessus pour relancer celle-ci :</p>
<ul id="liste-favoris">
</ul>
<p class="info-vide">( ∅ Aucune recherche enregistrée )</p>
</section>
</main>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="recherche.js"></script>
</body>
</html>