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';