Loading js/arriere-plan.js +12 −8 Original line number Diff line number Diff line Loading @@ -4,9 +4,13 @@ let fond = document.getElementById("fond") function actualiserArrierePlan(weatherCard){ let typetemps = weatherCard.determineWeather()//methode Victor // Pour tester l'affichage d'un certain thème: //let typetemps = "orage"; console.log(typetemps); if(typetemps == 'soleil'){ fond.style.background = 'url("../image/theme_clair.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_clair.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("soleil").style.display = "block" Loading @@ -19,7 +23,7 @@ function actualiserArrierePlan(weatherCard){ document.getElementById("grele").style.display = "none" } else if(typetemps == 'neige'){ fond.style.background = 'url("../image/theme_neigeux.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_neigeux.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("neige").style.display = "block" Loading @@ -32,7 +36,7 @@ function actualiserArrierePlan(weatherCard){ document.getElementById("grele").style.display = "none" } else if(typetemps == 'nuage'){ fond.style.background = 'url("../image/theme_nuageux.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_nuageux.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("nuage").style.display = "block" Loading @@ -45,7 +49,7 @@ function actualiserArrierePlan(weatherCard){ document.getElementById("grele").style.display = "none" } else if(typetemps == 'pluie'){ fond.style.background = 'url("../image/theme_pluie.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_pluie.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("pluie").style.display = "block" Loading @@ -58,7 +62,7 @@ function actualiserArrierePlan(weatherCard){ document.getElementById("grele").style.display = "none" } else if(typetemps == 'vent'){ fond.style.background = 'url("../image/theme_vent.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_vent.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("vent").style.display = "block" Loading @@ -71,7 +75,7 @@ function actualiserArrierePlan(weatherCard){ document.getElementById("grele").style.display = "none" } else if(typetemps == 'brume'){ fond.style.background = 'url("../image/theme_brume.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_brumeux.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("brume").style.display = "block" Loading @@ -84,7 +88,7 @@ function actualiserArrierePlan(weatherCard){ document.getElementById("grele").style.display = "none" } else if(typetemps == 'grele'){ fond.style.background = 'url("../image/theme_grele.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_grele.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("grele").style.display = "block" Loading @@ -97,7 +101,7 @@ function actualiserArrierePlan(weatherCard){ document.getElementById("pluie").style.display = "none" } else if(typetemps == 'orage'){ fond.style.background = 'url("../image/theme_orageux.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_orageux.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("orage").style.display = "block" Loading js/interface.js +3 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,9 @@ const labelEnsoleillement = document.getElementById("WCEnsoleillement"); // Nomb let villes_insee = new Map(); // Forcer l'actualisation (pour tester un arrière plan par exemple) //actualiserArrierePlan(null); function onRechercher(){ let codePostalS = barreRechercheCodePostal.value; Loading Loading @@ -86,9 +89,6 @@ function onSelectionneVille(){ function afficherMeteo(weatherCard){ labelVille.textContent = weatherCard.Ville(); //TODO remplir cette ligne //labelBref.textContent = "ensoleillé"; labelTemperatureMin.textContent = `${weatherCard.TempMin()} °C`; labelTemperatureMax.textContent = `${weatherCard.TempMax()} °C`; Loading Loading
js/arriere-plan.js +12 −8 Original line number Diff line number Diff line Loading @@ -4,9 +4,13 @@ let fond = document.getElementById("fond") function actualiserArrierePlan(weatherCard){ let typetemps = weatherCard.determineWeather()//methode Victor // Pour tester l'affichage d'un certain thème: //let typetemps = "orage"; console.log(typetemps); if(typetemps == 'soleil'){ fond.style.background = 'url("../image/theme_clair.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_clair.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("soleil").style.display = "block" Loading @@ -19,7 +23,7 @@ function actualiserArrierePlan(weatherCard){ document.getElementById("grele").style.display = "none" } else if(typetemps == 'neige'){ fond.style.background = 'url("../image/theme_neigeux.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_neigeux.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("neige").style.display = "block" Loading @@ -32,7 +36,7 @@ function actualiserArrierePlan(weatherCard){ document.getElementById("grele").style.display = "none" } else if(typetemps == 'nuage'){ fond.style.background = 'url("../image/theme_nuageux.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_nuageux.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("nuage").style.display = "block" Loading @@ -45,7 +49,7 @@ function actualiserArrierePlan(weatherCard){ document.getElementById("grele").style.display = "none" } else if(typetemps == 'pluie'){ fond.style.background = 'url("../image/theme_pluie.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_pluie.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("pluie").style.display = "block" Loading @@ -58,7 +62,7 @@ function actualiserArrierePlan(weatherCard){ document.getElementById("grele").style.display = "none" } else if(typetemps == 'vent'){ fond.style.background = 'url("../image/theme_vent.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_vent.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("vent").style.display = "block" Loading @@ -71,7 +75,7 @@ function actualiserArrierePlan(weatherCard){ document.getElementById("grele").style.display = "none" } else if(typetemps == 'brume'){ fond.style.background = 'url("../image/theme_brume.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_brumeux.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("brume").style.display = "block" Loading @@ -84,7 +88,7 @@ function actualiserArrierePlan(weatherCard){ document.getElementById("grele").style.display = "none" } else if(typetemps == 'grele'){ fond.style.background = 'url("../image/theme_grele.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_grele.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("grele").style.display = "block" Loading @@ -97,7 +101,7 @@ function actualiserArrierePlan(weatherCard){ document.getElementById("pluie").style.display = "none" } else if(typetemps == 'orage'){ fond.style.background = 'url("../image/theme_orageux.jpg") no-repeat fixed' fond.style.background = 'url("./image/theme_orageux.jpg") no-repeat fixed' fond.style.backgroundSize = 'cover' titre.classList.add('sombre') document.getElementById("orage").style.display = "block" Loading
js/interface.js +3 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,9 @@ const labelEnsoleillement = document.getElementById("WCEnsoleillement"); // Nomb let villes_insee = new Map(); // Forcer l'actualisation (pour tester un arrière plan par exemple) //actualiserArrierePlan(null); function onRechercher(){ let codePostalS = barreRechercheCodePostal.value; Loading Loading @@ -86,9 +89,6 @@ function onSelectionneVille(){ function afficherMeteo(weatherCard){ labelVille.textContent = weatherCard.Ville(); //TODO remplir cette ligne //labelBref.textContent = "ensoleillé"; labelTemperatureMin.textContent = `${weatherCard.TempMin()} °C`; labelTemperatureMax.textContent = `${weatherCard.TempMax()} °C`; Loading