Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
018f8e558b | ||
|
0f71011bc1 | ||
|
9773501631 | ||
|
8793fd5c0c | ||
|
2cdce319f9 | ||
|
60135b6750 |
0
assets/image
Normal file
0
assets/image
Normal file
@ -12,11 +12,13 @@ function remplissage(EPISODES){
|
|||||||
<section class="resultat accordeon_item">
|
<section class="resultat accordeon_item">
|
||||||
<h1 class="accordeon_item_header">${EPISODES.results[index].title}</h1>
|
<h1 class="accordeon_item_header">${EPISODES.results[index].title}</h1>
|
||||||
<div class="accordeon_item_body">
|
<div class="accordeon_item_body">
|
||||||
|
<div class="column1">
|
||||||
<p class= "episode">Episode : ${EPISODES.results[index].episode_id}</p>
|
<p class= "episode">Episode : ${EPISODES.results[index].episode_id}</p>
|
||||||
<p class= "directeur">Directeur : ${EPISODES.results[index].director}</p>
|
<p class= "directeur">Directeur : ${EPISODES.results[index].director}</p>
|
||||||
<p class= "producteur">Producteur : ${EPISODES.results[index].producer}</p>
|
<p class= "producteur">Producteur : ${EPISODES.results[index].producer}</p>
|
||||||
<p class= "sortie">Date de Sortie : ${EPISODES.results[index].release_date}</p>
|
<p class= "sortie">Date de Sortie : ${EPISODES.results[index].release_date}</p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</section>`
|
</section>`
|
||||||
}
|
}
|
||||||
const accordeonItemHeader = document.querySelectorAll(".accordeon_item_header");
|
const accordeonItemHeader = document.querySelectorAll(".accordeon_item_header");
|
||||||
|
@ -86,9 +86,16 @@ console.log('personnage.js loaded');
|
|||||||
</div>
|
</div>
|
||||||
</section>`;
|
</section>`;
|
||||||
|
|
||||||
|
}
|
||||||
//Pagination
|
//Pagination
|
||||||
createPagination(previousUrl, nextUrl, PERSONNAGES, remplissage);
|
createPagination(previousUrl, nextUrl, PERSONNAGES, remplissage);
|
||||||
|
|
||||||
|
const accordeonItemHeader = document.querySelectorAll(".accordeon_item_header");
|
||||||
|
accordeonItemHeader.forEach(accordeonItemHeader => {
|
||||||
|
accordeonItemHeader.addEventListener("click", event => {
|
||||||
|
accordeonItemHeader.classList.toggle("active");
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
api_call(API_URL + "/people", remplissage);
|
api_call(API_URL + "/people", remplissage);
|
||||||
|
@ -42,11 +42,11 @@ function remplissage(results) {
|
|||||||
createPagination(previousUrl, nextUrl, planetes, remplissage);
|
createPagination(previousUrl, nextUrl, planetes, remplissage);
|
||||||
|
|
||||||
const accordeonItemHeader = document.querySelectorAll(".accordeon_item_header");
|
const accordeonItemHeader = document.querySelectorAll(".accordeon_item_header");
|
||||||
for (item of accordeonItemHeader) {
|
accordeonItemHeader.forEach(accordeonItemHeader => {
|
||||||
item.addEventListener("click", (event) => {
|
accordeonItemHeader.addEventListener("click", event => {
|
||||||
item.classList.toggle("active");
|
accordeonItemHeader.classList.toggle("active");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
api_call(API_URL + "/planets", remplissage);
|
api_call(API_URL + "/planets", remplissage);
|
||||||
|
Loading…
Reference in New Issue
Block a user