You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Can you add a switch logo when changing themes
i already made one of my versions, but it could be better by just changing the attributes for the 2 logo modes (light, dark).
My code :
consttoggler=document.getElementById("toggle-dark")// Function for toggling logo when theme mode changedfunctiontoggleTheme(){letcurrTheme=document.documentElement.getAttribute("data-bs-theme");// NOTE Add Condition to change logoletlogo_path='/static/images/logo/';letcurrLogo=app_asset_url+logo_path+"/logo.png";if(currTheme!=="dark"){// Dark ModecurrLogo=app_asset_url+logo_path+"/logo2.png";}else{// Light ModecurrLogo=app_asset_url+logo_path+"/logo.png";}document.getElementById("logo_img").setAttribute('src',currLogo);}if(toggler){toggler.checked=theme==="dark"toggler.removeEventListener("input",toggleTheme);toggler.addEventListener("input",toggleTheme);}
The text was updated successfully, but these errors were encountered:
mocfaisal
changed the title
Toggle Logo by theme
Toggle Logo Sidebar by theme
Jun 25, 2024
Hi, this is a great additionial feature. But for the starter template, we only need one logo unaffected by the dark/light mode. You can implement it into your own application.
Hi,
Can you add a switch logo when changing themes
i already made one of my versions, but it could be better by just changing the attributes for the 2 logo modes (light, dark).
My code :
The text was updated successfully, but these errors were encountered: