From 104f65dc53fd4e86dd797917146eac4e6c7c692e Mon Sep 17 00:00:00 2001 From: css pro Date: Wed, 2 Oct 2024 17:32:45 -0700 Subject: [PATCH] Update darkmoderewrite.js --- js/darkmoderewrite.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/js/darkmoderewrite.js b/js/darkmoderewrite.js index 04f5dd7..32ae26b 100644 --- a/js/darkmoderewrite.js +++ b/js/darkmoderewrite.js @@ -3,25 +3,37 @@ $(document).ready(function() { var isChecked = $("#darkModeCheckbox").is(":checked"); if (isChecked) { const body = document.querySelector('body'); - body.style.backgroundColor = '#404040'; + body.style.backgroundColor = '#141414'; body.style.color = '#f1f1f1'; const p = document.querySelector('p'); p.style.color = '#f1f1f1'; - const head = document.querySelector('h1'); + const headTwo = document.querySelector('h2'); head.style.color = '#f1f1f1'; + + const head = document.querySelector('h1'); + headTwo.style.color = '#f1f1f1'; const foot = document.querySelector('.footer'); foot.style.backgroundColor = 'grey'; const button = document.querySelector('button'); - button.style.backgroundColor = '#13f4f3'; + button.style.backgroundColor = '#21ccaa'; } else { const body = document.querySelector('body'); body.style.backgroundColor = '#f1f1f1'; body.style.color = 'black'; + + const p = document.querySelector('p'); + p.style.color = 'black'; + + const headTwo = document.querySelector('h2'); + head.style.color = 'black'; + + const head = document.querySelector('h1'); + headTwo.style.color = 'black'; const foot = document.querySelector('.footer'); foot.style.backgroundColor = '#ddd';