Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature-Request] Dark mode make website more attractive #179

Open
mohitmk007 opened this issue Sep 29, 2023 · 3 comments
Open

[feature-Request] Dark mode make website more attractive #179

mohitmk007 opened this issue Sep 29, 2023 · 3 comments

Comments

@mohitmk007
Copy link

add dark mode functionality

@Pratik-09pp
Copy link

@mohitmk007 I would like to work on this issue? Can you assign it to me?

@Tsiangana
Copy link

The code:

let button1 = document.getElementbyId("button1");
let button2 = document.getElementbyId("button2");

button1.addEventListener('click', ()=>{
body.style.background= "#000";
button1.style.display = "none";
button2.style.display = "inline";
})
button2.addEventListener('click', ()=>{
body.style.background= "#fff";
button2.style.display = "none";
button1.style.display = "inline";
})

**This is the simplest way to create dark mode, it's so simple that any beginner can do it.

creates two buttons in the same place, one will start with the value none, while the other will have the value iniline, when one is activated it changes the color of the body and hides itself while the other appears and vice versa.

There are several ways to do dak mode with js and other more professional ways, but this is the simplest and fastest way to do it**

@That1ProgrammerJS
Copy link

Is There A Website?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants