Skip to content

Commit

Permalink
Update darkToggle.js
Browse files Browse the repository at this point in the history
  • Loading branch information
SamarthJ2004 authored Jan 11, 2024
1 parent f6e3cd9 commit 024b5f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions javascript/darkToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function themeSet(){
backLightImage();
function backLightImage(){
i+=1;
document.querySelector(".hero-heading").style.backgroundImage=`url('../styles/images/hero-light/hero${i}.jpeg')`;
document.querySelector(".hero-heading").style.backgroundImage=`url('https://${location.hostname}/WOC-artWarp/styles/images/hero-light/hero${i}.jpeg')`;
i===4?i=-1:null;
backId=setTimeout(backLightImage,5000);
}
Expand All @@ -42,7 +42,7 @@ function toDark(){
backDarkImage();
function backDarkImage(){
j+=1;
document.querySelector(".hero-heading").style.backgroundImage=`url('../styles/images/hero-dark/hero${j}.jpeg')`;
document.querySelector(".hero-heading").style.backgroundImage=`url('https://${location.hostname}/WOC-artWarp/styles/images/hero-dark/hero${j}.jpeg')`;
j===5?j=-1:null;
backId=setTimeout(backDarkImage,5000);
}
Expand Down Expand Up @@ -83,7 +83,7 @@ function toLight(){
backLightImage();
function backLightImage(){
i+=1;
document.querySelector(".hero-heading").style.backgroundImage=`url('../styles/images/hero-light/hero${i}.jpeg')`;
document.querySelector(".hero-heading").style.backgroundImage=`url('https://${location.hostname}/WOC-artWarp/styles/images/hero-light/hero${i}.jpeg')`;
i===4?i=-1:null;
backId=setTimeout(backLightImage,5000);
}
Expand All @@ -107,4 +107,4 @@ function toLight(){
document.querySelectorAll("#fav-icon").forEach((item)=>{
item.innerHTML='<i class="fa-regular fa-heart fa-xl" style="color: #000000;"></i>';});
}
}
}

0 comments on commit 024b5f8

Please sign in to comment.