-
Notifications
You must be signed in to change notification settings - Fork 0
/
choixperso.html
135 lines (84 loc) · 3.98 KB
/
choixperso.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Patua+One" rel="stylesheet">
<title>Choice perso</title>
</head>
<body>
<div class = "container">
<h1 class= "text-center">CHOOSE YOUR DETECTIVE</h1>
<div class="row">
<div class="col-12 col-md-6 ">
<div id="Batman" class="img-responsive"></div>
<div id="BatBio"></div>
</div>
<div class=" col-12 col-md-4 offset-md-2 ">
<div id ="Judge" class="img-responsive"></div>
<div id="judgeBio"></div>
</div>
</div>
</div>
<script type="module">
// =======================PERSO BATMAN
//get l'id Batman sur le DOM
const batman = document.getElementById('Batman');
const bioBat = document.getElementById('BatBio');
// Fichier json perso
window.fetch("https://cdn.rawgit.com/akabab/superhero-api/0.2.0/api/id/70.json")
.then(resp => resp.json())
.then (json =>{
console.log(json);
//image perso Batman
let imgBatman= json.images.md
console.log(imgBatman);
//Bio Batman
let bioBatman = json.biography
console.log(bioBatman);
//insertion de l'image batman
batman.innerHTML = ("<a href=\"batmanStory/batmanStory1.html\"><img class=\"imground\"src = 'https://cdn.rawgit.com/akabab/superhero-api/0.2.0/api/images/md/70-batman.jpg' />");
// insertion Bio Batman
bioBat.innerHTML = `Full name : ${json.biography.fullName} <br>
Place of Birth : ${json.biography.placeOfBirth} <br>
Publisher : ${json.biography.publisher}`
});
//===================PERSO JUDGE DREDD
//get l'id Judge dredd
const judge = document.getElementById('Judge');
const judgeBiography = document.getElementById('judgeBio');
// Fichier json perso Judge dredd
window.fetch("https://cdn.rawgit.com/akabab/superhero-api/0.2.0/api/id/373.json")
.then(resp => resp.json())
.then (json =>{
console.log(json);
//image perso Judge dredd
let imgJudgeDredd= json.images.md
console.log(imgJudgeDredd);
//Bio Judge
let bioJudgeDredd = json.biography
console.log(bioJudgeDredd);
//insertion de l'image Judge
judge.innerHTML = ("<a href=\"judgeStory/judgeStory1.html\"><img class=\"imground \" src ='https://cdn.rawgit.com/akabab/superhero-api/0.2.0/api/images/md/373-judge-dredd.jpg'/>");
//insertion Bio judge dredd
judgeBio.innerHTML = `Full name : ${json.biography.fullName} <br>
Place of Birth : ${json.biography.placeOfBirth} <br>
Publisher : ${json.biography.publisher}`
})
// ================ APi deezer
(function(d, s, id) {
let js, djs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "https://e-cdns-files.dzcdn.net/js/widget/loader.js";
djs.parentNode.insertBefore(js, djs);
}(document, "script", "deezer-widget-loader"));
</script>
<div class="deezer-widget-player" data-src="https://www.deezer.com/plugins/player?format=classic&autoplay=true&playlist=true&width=700&height=350&color=007FEB&layout=dark&size=medium&type=tracks&id=6524423&app_id=1" data-scrolling="no" data-frameborder="0" data-allowTransparency="true" data-width="10" data-height="10"></div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>