Skip to content

Commit

Permalink
Corrigindo erro nas alteracoes de imagem pelos temas
Browse files Browse the repository at this point in the history
  • Loading branch information
GustavoPereira-Dev committed Jan 17, 2024
1 parent c2d0218 commit e8578ea
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,21 @@ window.addEventListener('beforeunload', function() {
function changeMode(isDarkMode){
if (!isDarkMode) {
document.querySelector('body').classList.add('light-mode');
favicon.href="/images/logo2.png"
logoNav.src="/images/logo2.png"
logoFooter.src="/images/logo2.png"
favicon.href="./images/logo2.png"
logoNav.src="./images/logo2.png"
logoFooter.src="./images/logo2.png"

const imgTop = document.querySelector("#img_topo");
if(imgTop) imgTop.src = "/images/topo2.png";
if(imgTop) imgTop.src = "./images/topo2.png";

} else {
document.querySelector('body').classList.remove('light-mode');
favicon.href="/images/logo1.png"
logoNav.src="/images/logo1.png"
logoFooter.src="/images/logo1.png"
favicon.href="./images/logo1.png"
logoNav.src="./images/logo1.png"
logoFooter.src="./images/logo1.png"

const imgTop = document.querySelector("#img_topo");
if(imgTop) imgTop.src = "/images/topo1.png";
if(imgTop) imgTop.src = "./images/topo1.png";

//document.querySelector('.menu-desktop a[href="#inicio"]').innerHTML = "Tester <br> xuxu"
}
Expand Down

0 comments on commit e8578ea

Please sign in to comment.