From 42cbbebb3e73235690981d4d3d4d5d0680255adb Mon Sep 17 00:00:00 2001 From: Prakhar Pandey Date: Sat, 26 Nov 2022 01:07:06 +0530 Subject: [PATCH 1/2] Changed the dark mode icon --- .vscode/settings.json | 3 +++ index.html | 2 +- index.js | 10 ++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6f3a291 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/index.html b/index.html index f0c5f5d..af3deb1 100644 --- a/index.html +++ b/index.html @@ -161,7 +161,7 @@ diff --git a/index.js b/index.js index 4effaf0..434b58f 100644 --- a/index.js +++ b/index.js @@ -40,6 +40,16 @@ function darkMode() { element.style.borderRight = "2px solid white"; } } + const toggleButton = document.getElementById("dark-mode-enable"); + + if(toggleButton.classList.contains("fa-moon")){ + toggleButton.classList.remove("fa-moon"); + toggleButton.classList.add("fa-lightbulb"); + } + else{ + toggleButton.classList.remove("fa-lightbulb"); + toggleButton.classList.add("fa-moon"); + } } const toggles = document.querySelectorAll(".faq-toggle"); From 931a665d89842f6ec43abb30d286a254294865ff Mon Sep 17 00:00:00 2001 From: Prakhar Pandey Date: Sat, 26 Nov 2022 01:28:22 +0530 Subject: [PATCH 2/2] Changed the dark and light mode icons --- CONTRIBUTORS | 1 + index.html | 2 +- index.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 217f5a8..e959a7b 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -39,3 +39,4 @@ Daniele Avolio Adhetya Narayan J.M Ranjana Reghunath Rudraksh Karpe +Prakhar Pandey \ No newline at end of file diff --git a/index.html b/index.html index af3deb1..aaef71c 100644 --- a/index.html +++ b/index.html @@ -161,7 +161,7 @@ diff --git a/index.js b/index.js index 434b58f..441366a 100644 --- a/index.js +++ b/index.js @@ -40,6 +40,7 @@ function darkMode() { element.style.borderRight = "2px solid white"; } } + const toggleButton = document.getElementById("dark-mode-enable"); if(toggleButton.classList.contains("fa-moon")){