From eb100ab7145019fe136450ea6e405dd2700b8675 Mon Sep 17 00:00:00 2001 From: Jatin Gupta <128694793+jatin009v@users.noreply.github.com> Date: Sun, 6 Oct 2024 18:00:08 +0530 Subject: [PATCH] Add files via upload --- Drak mode/index.html | 116 +++++++++++++++++++++++++++++++++++++++++++ Drak mode/script.js | 10 ++++ Drak mode/style.css | 19 +++++++ 3 files changed, 145 insertions(+) create mode 100644 Drak mode/index.html create mode 100644 Drak mode/script.js create mode 100644 Drak mode/style.css diff --git a/Drak mode/index.html b/Drak mode/index.html new file mode 100644 index 0000000..afe9f79 --- /dev/null +++ b/Drak mode/index.html @@ -0,0 +1,116 @@ + + + + + + + Document + + + + + + + + + +
+ + + +
+ + + + + + + + + \ No newline at end of file diff --git a/Drak mode/script.js b/Drak mode/script.js new file mode 100644 index 0000000..c13ec46 --- /dev/null +++ b/Drak mode/script.js @@ -0,0 +1,10 @@ +// Dark Mode Toggle +const darkModeToggle = document.getElementById('darkModeToggle'); +darkModeToggle.addEventListener('click', () => { + document.body.classList.toggle('dark-mode'); + if (document.body.classList.contains('dark-mode')) { + darkModeToggle.textContent = 'Light Mode'; + } else { + darkModeToggle.textContent = 'Dark Mode'; + } +}); diff --git a/Drak mode/style.css b/Drak mode/style.css new file mode 100644 index 0000000..bebcf19 --- /dev/null +++ b/Drak mode/style.css @@ -0,0 +1,19 @@ +/* Dark Mode Styles */ +body.dark-mode { + background-color: #121212; + color: #ffffff; +} + +body.dark-mode .navbar { + background-color: #1c1c1c; +} + +body.dark-mode .btn-outline-light { + color: #ffffff; + border-color: #ffffff; +} + +body.dark-mode .btn-outline-light:hover { + background-color: #ffffff; + color: #121212; +}