chore: change dark-mode css colors for links and background

This commit is contained in:
Matthew McKinnon 2024-09-15 14:18:18 +10:00
parent 4183f254d2
commit 2129e0dce8
2 changed files with 7 additions and 3 deletions

View File

@ -155,8 +155,8 @@ button:hover {
body.dark-mode {
--bg-color: black;
--post-bg-color: #333;
--text-color: #ffffff;
--post-bg-color: #222222;
--text-color: #dddddd;
--button-bg-color: #ffffff;
--button-text-color: #000000;
}
@ -225,6 +225,10 @@ h1 {
text-decoration: none;
}
a {
color: #0f85af;
}
.menu li a:hover {

View File

@ -10,7 +10,7 @@ document.addEventListener('DOMContentLoaded', () => {
switcher.addEventListener('click', () => {
document.body.classList.toggle('dark-mode');
const mode = document.body.classList.contains('dark-mode') ? 'light' : 'dark';
const mode = document.body.classList.contains('dark-mode') ? 'dark' : 'light';
// switcher.textContent = mode === 'dark' ? 'Switch to Light Mode' : 'Switch to Dark Mode';
localStorage.setItem('theme', mode);
});