dark light mode pt.2

This commit is contained in:
msoliman3
2022-11-02 19:18:26 +01:00
parent 963fab87b2
commit 6145aaafac
2 changed files with 18 additions and 13 deletions

View File

@@ -51,9 +51,20 @@ $(window).on("test", function(e, filter) {
let root = document.querySelector(":root")
$(".logo").on("click", function() {
if (root.style.getPropertyValue("--main-bg") === 'ghostwhite') {
if (root.style.getPropertyValue("--main-bg") === 'snow') {
console.log("IM here")
root.style.setProperty('--main-medium-dark', '#1E1E1E');
root.style.setProperty('--main-bg', '#292929');
root.style.setProperty('--main-light', ' #ffffff' );
root.style.setProperty('--main-dark', '#ffffff');
root.style.setProperty('--tweet-color', '#000000')
root.style.setProperty('--column-color', '#1E1E1E')
} else {
root.style.setProperty('--main-bg', 'ghostwhite');
root.style.setProperty('--main-medium-dark', '#1D9BF0');
root.style.setProperty('--main-bg', 'snow');
root.style.setProperty('--main-light', '#000000');
root.style.setProperty('--main-dark', ' #000000');
root.style.setProperty('--tweet-color', 'whitesmoke');
root.style.setProperty('--column-color', 'rgba(112, 128, 144, 0.388');
}
})

View File

@@ -3,6 +3,8 @@
--main-light: #ffffff;
--main-medium-dark: #1E1E1E;
--main-dark: #000000;
--tweet-color: #000000;
--column-color: #1E1E1E;
--secondary: #1D9BF0;
}
@@ -90,7 +92,7 @@ body {
.tweet {
display: flex;
background-color: var(--main-dark);
background-color: var(--tweet-color);
border-radius: 16px;
padding: 16px;
}
@@ -189,12 +191,8 @@ body {
grid-row: 1/ -1;
}
.leftcol {
background-color: red;
}
.centercol {
background-color: green;
.leftcol, .centercol, .rightcol, .searchcontainer, .popchart {
background-color: var(--column-color);
}
.rightcol {
@@ -203,16 +201,12 @@ body {
}
.searchcontainer {
background-color: blue;
padding: 8px;
box-sizing: border-box;
display: flex;
flex-wrap: wrap;
}
.popchart {
background-color: rgba(255, 0, 255, 0.344);
}
.colheader {
display: block;