From e8578ea913e5b447f96a14c7e597ad653a5e27bc Mon Sep 17 00:00:00 2001 From: Gustavo-Henrique-da-Silva Date: Tue, 16 Jan 2024 23:38:24 -0300 Subject: [PATCH] Corrigindo erro nas alteracoes de imagem pelos temas --- index.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index 39b2d61..9223677 100644 --- a/index.js +++ b/index.js @@ -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
xuxu" }