Commit 9e504910 authored by Victor friboulet's avatar Victor friboulet
Browse files

🐛 correction et adaptation à weather card

parent 782f18d8
Loading
Loading
Loading
Loading
+13 −11
Original line number Diff line number Diff line
@@ -4,45 +4,47 @@ let fond = document.getElementById("fond")
let recherche = document.getElementById("recherche")

recherche.addEventListener("click", ()=>{
    let typetemps = WeatherCard.weather()/*methode Victor*/
    if(typetemps = 'soleil'){
    let typetemps = weather.determineWeather()/*methode Victor*/
    //console.log(typetemps);
    if(typetemps == 'soleil'){
        fond.style.background = 'url("../image/theme_clair.jpg") no-repeat fixed'
        fond.style.backgroundSize = 'cover'
        titre.classList.add('sombre')
    }
    if(typetemps = 'neige'){
    else if(typetemps == 'neige'){
        fond.style.background = 'url("../image/theme_neigeux.jpg") no-repeat fixed'
        fond.style.backgroundSize = 'cover' 
        titre.classList.add('sombre')
    }
    if(typetemps = 'nuage'){
    else if(typetemps == 'nuage'){
        fond.style.background = 'url("../image/theme_nuageux.jpg") no-repeat fixed'
        fond.style.backgroundSize = 'cover'
        titre.classList.add('sombre')
    }
    if(typetemps = 'pluie'){
    else if(typetemps == 'pluie'){
        fond.style.background = 'url("../image/theme_pluie.jpg") no-repeat fixed'
        fond.style.backgroundSize = 'cover'
        titre.classList.add('sombre')
    }
    if(typetemps = 'vent'){
    else if(typetemps == 'vent'){
        fond.style.background = 'url("../image/theme_vent.jpg") no-repeat fixed'
        fond.style.backgroundSize = 'cover'
        titre.classList.add('sombre')
    }
    if(typetemps = 'brume'){
    else if(typetemps == 'brume'){
        fond.style.background = 'url("../image/theme_brume.jpg") no-repeat fixed'
        fond.style.backgroundSize = 'cover'
        titre.classList.add('sombre')
    }
    if(typetemps = 'orage'){
        fond.style.background = 'url("../image/theme_orageux.jpg") no-repeat fixed'
    else if(typetemps == 'grele'){
        fond.style.background = 'url("../image/theme_grele.jpg") no-repeat fixed'
        fond.style.backgroundSize = 'cover'
        titre.classList.add('sombre')
    }
    if(typetemps = 'grele'){
        fond.style.background = 'url("../image/theme_grele.jpg") no-repeat fixed'
    else if(typetemps == 'orage'){
        fond.style.background = 'url("../image/theme_orageux.jpg") no-repeat fixed'
        fond.style.backgroundSize = 'cover'
        titre.classList.add('sombre')
    }
    
})