diff --git a/assets/imgs/titre.png b/assets/imgs/titre.png new file mode 100644 index 0000000..e7ce2f6 Binary files /dev/null and b/assets/imgs/titre.png differ diff --git a/films.html b/films.html index 78c2c1a..e629834 100644 --- a/films.html +++ b/films.html @@ -19,12 +19,8 @@ -
-
-
-
-
-
-
+
+ +
\ No newline at end of file diff --git a/scripts/films.js b/scripts/films.js index 5b98345..b2934a2 100644 --- a/scripts/films.js +++ b/scripts/films.js @@ -1,5 +1,23 @@ -const EPISODE4 = document.getElementById('Ep4'); -const DONNEES = document.getElementById('donnees'); -const VAISSEAUX = document.getElementById('vaisseaux'); -const PLANETES = document.getElementById('planetes'); +const FILMS = document.getElementById('reponses-films'); +const DEPLIE = document.getElementById ('deploiement-films'); +console.log(FILMS); + +const API_URL = "https://swapi.dev/api/films/"; +fetch(API_URL) +.then((response) => { + console.log(response); + return response.json(); +}) +.then(afficherFilms => { + console.log(afficherFilms); + for(let index = 0; index <6; index++){ + console.log(afficherFilms.results[index]); + const EPISODES = afficherFilms.results[index]; + console.log(EPISODES); + + FILMS.innerHTML +=` +

${EPISODES.title}

+ ` + } +}) \ No newline at end of file diff --git a/styles/style.css b/styles/style.css index cf76b6b..35efde0 100644 --- a/styles/style.css +++ b/styles/style.css @@ -7,27 +7,42 @@ margin: 0; padding: 0; font-family: 'star-wars', serif; + color : #FFF; } .titre a{ - text-decoration: none; + margin-top : 20px; + background-color: transparent; + width: 25%; + content: url("../assets/imgs/titre.png"); + font-size: xx-large; + text-decoration: underline; + text-decoration-color: #ffe81f; } .ul-menu{ list-style-type: none; + font-size: large; + text-decoration: underline; + text-decoration-color: #ffe81f; } .ul-menu li{ display: inline; float: left; margin: 1em; + font-size: large; + text-decoration: underline; + text-decoration-color: #ffe81f; } .ul-menu li a{ display: block; padding: 5px; text-align: center; - text-decoration: none; + font-size: large; + text-decoration: underline; + text-decoration-color: #ffe81f; } body{ @@ -36,9 +51,20 @@ body{ div.image-films { background-color: transparent; - margin-top: 20px; + margin-top: -170px; margin-left: auto; width: 30%; content: url("../assets/imgs/mando.png"); +} +#reponses-films { + color : #FFF; + float: left; + margin-top : 200px; +} + +#deploiement-films { + color : #000; + float: left; + margin-top : 200px; } \ No newline at end of file