Compare commits

..

6 Commits

Author SHA1 Message Date
William Noris
018f8e558b
Merge pull request #19 from rasoirnoir/dev
Mise en prod
2021-10-20 11:52:03 +02:00
William Noris
0f71011bc1
Merge pull request #18 from rasoirnoir/hotfix1
fix accordeons
2021-10-20 10:53:42 +02:00
William Noris
9773501631 fix accordeons 2021-10-20 10:53:02 +02:00
William Noris
8793fd5c0c
Merge pull request #17 from rasoirnoir/recherche
Recherche
2021-10-20 10:42:32 +02:00
William Noris
2cdce319f9
Merge pull request #5 from rasoirnoir/Personnage
Branche d'Isabelle
2021-10-18 20:15:04 +02:00
HarmandI
60135b6750 Bazar 2021-10-18 17:34:11 +02:00
4 changed files with 94 additions and 85 deletions

0
assets/image Normal file
View File

View File

@ -12,11 +12,13 @@ function remplissage(EPISODES){
<section class="resultat accordeon_item">
<h1 class="accordeon_item_header">${EPISODES.results[index].title}</h1>
<div class="accordeon_item_body">
<div class="column1">
<p class= "episode">Episode : ${EPISODES.results[index].episode_id}</p>
<p class= "directeur">Directeur : ${EPISODES.results[index].director}</p>
<p class= "producteur">Producteur : ${EPISODES.results[index].producer}</p>
<p class= "sortie">Date de Sortie : ${EPISODES.results[index].release_date}</p>
</div>
</div>
</section>`
}
const accordeonItemHeader = document.querySelectorAll(".accordeon_item_header");

View File

@ -86,9 +86,16 @@ console.log('personnage.js loaded');
</div>
</section>`;
}
//Pagination
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);

View File

@ -42,11 +42,11 @@ function remplissage(results) {
createPagination(previousUrl, nextUrl, planetes, remplissage);
const accordeonItemHeader = document.querySelectorAll(".accordeon_item_header");
for (item of accordeonItemHeader) {
item.addEventListener("click", (event) => {
item.classList.toggle("active");
accordeonItemHeader.forEach(accordeonItemHeader => {
accordeonItemHeader.addEventListener("click", event => {
accordeonItemHeader.classList.toggle("active");
});
});
}
}
api_call(API_URL + "/planets", remplissage);