-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add wallet connect theme switch option, disable particle effects in l…
…ight theme
- Loading branch information
1 parent
bff6918
commit 1856c3f
Showing
4 changed files
with
22 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
document.querySelector('.theme-switch-button').addEventListener('click', function() { | ||
var themeLink = document.getElementById('theme-link'); | ||
var themeLinkResponsive = document.getElementById('theme-link-responsive'); | ||
var connectAcceptButton = document.getElementById('connectAccept'); | ||
var particlesElement = document.getElementById('particles-js'); | ||
|
||
if (themeLink.getAttribute('href').includes('css/style.css') && | ||
themeLinkResponsive.getAttribute('href').includes('css/responsive.css')) { | ||
themeLink.setAttribute('href', 'css/light-version/style.css'); | ||
themeLinkResponsive.setAttribute('href', 'css/light-version/responsive.css'); | ||
document.body.setAttribute("data-theme", "light"); // Set data-theme to light | ||
connectAcceptButton.setAttribute('data-param', 'light'); | ||
particlesElement.style.visibility = 'hidden'; | ||
} else { | ||
themeLink.setAttribute('href', 'css/style.css'); | ||
themeLinkResponsive.setAttribute('href', 'css/responsive.css'); | ||
document.body.setAttribute("data-theme", "dark"); // Set data-theme to dark | ||
connectAcceptButton.setAttribute('data-param', 'dark'); | ||
particlesElement.style.visibility = 'visible'; | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters