Dark mode fully works (colors are for testing, someone make them good) + deleted old darkmode.js
This commit is contained in:
parent
3238807251
commit
4b7262f64b
@ -55,11 +55,12 @@ h1 {
|
|||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2,
|
h2 {
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
p {
|
p {
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
background-color: #4caf50;
|
background-color: #4caf50;
|
||||||
color: white;
|
color: white;
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
var dCheck = document.getElementById("dMode");
|
|
||||||
alert("darmode.js working");
|
|
||||||
|
|
||||||
dCheck.onclick = function dClick(){
|
|
||||||
console.log("heck yeah");
|
|
||||||
var inputs = document.getElementsByTagName('input');
|
|
||||||
var body = document.body;
|
|
||||||
|
|
||||||
body.style.color="f1f1f1";
|
|
||||||
body.style.backgroundColor="3c3c3c";
|
|
||||||
|
|
||||||
for(var i=0; i<inputs.length i++){
|
|
||||||
if(inputs[i].getAttribute('type')=='button'){
|
|
||||||
inputs.style.backgroundColor="#13f4f3";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -6,8 +6,10 @@ $(document).ready(function() {
|
|||||||
body.style.backgroundColor = '#141414';
|
body.style.backgroundColor = '#141414';
|
||||||
body.style.color = '#f1f1f1';
|
body.style.color = '#f1f1f1';
|
||||||
|
|
||||||
const p = document.querySelector('p');
|
const paragraphs = document.querySelectorAll('p');
|
||||||
p.style.color = '#f1f1f1';
|
paragraphs.forEach(function(p) {
|
||||||
|
p.style.color = '#f1f1f1';
|
||||||
|
});
|
||||||
|
|
||||||
const headTwo = document.querySelector('h2');
|
const headTwo = document.querySelector('h2');
|
||||||
headTwo.style.color = '#f1f1f1';
|
headTwo.style.color = '#f1f1f1';
|
||||||
@ -18,16 +20,25 @@ $(document).ready(function() {
|
|||||||
const foot = document.querySelector('.footer');
|
const foot = document.querySelector('.footer');
|
||||||
foot.style.backgroundColor = '#808080';
|
foot.style.backgroundColor = '#808080';
|
||||||
|
|
||||||
const button = document.querySelector('button');
|
const buttons = document.querySelectorAll('button');
|
||||||
button.style.backgroundColor = '#21ccaa';
|
buttons.forEach(function(button) {
|
||||||
|
button.style.backgroundColor = '#01452c';
|
||||||
|
});
|
||||||
|
|
||||||
|
const versionTexts = document.querySelectorAll('.version-text');
|
||||||
|
versionTexts.forEach(function(vt) {
|
||||||
|
vt.style.color = '#f1f1f1';
|
||||||
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
const body = document.querySelector('body');
|
const body = document.querySelector('body');
|
||||||
body.style.backgroundColor = '#f1f1f1';
|
body.style.backgroundColor = '#f1f1f1';
|
||||||
body.style.color = 'black';
|
body.style.color = 'black';
|
||||||
|
|
||||||
const p = document.querySelector('p');
|
const paragraphs = document.querySelectorAll('p');
|
||||||
p.style.color = 'black';
|
paragraphs.forEach(function(p) {
|
||||||
|
p.style.color = 'black';
|
||||||
|
});
|
||||||
|
|
||||||
const headTwo = document.querySelector('h2');
|
const headTwo = document.querySelector('h2');
|
||||||
headTwo.style.color = 'black';
|
headTwo.style.color = 'black';
|
||||||
@ -38,9 +49,15 @@ $(document).ready(function() {
|
|||||||
const foot = document.querySelector('.footer');
|
const foot = document.querySelector('.footer');
|
||||||
foot.style.backgroundColor = '#ddd';
|
foot.style.backgroundColor = '#ddd';
|
||||||
|
|
||||||
const button = document.querySelector('button');
|
const buttons = document.querySelectorAll('button');
|
||||||
button.style.backgroundColor = '#4caf50';
|
buttons.forEach(function(button) {
|
||||||
|
button.style.backgroundColor = '#4caf50';
|
||||||
|
});
|
||||||
|
|
||||||
|
const versionTexts = document.querySelectorAll('.version-text');
|
||||||
|
versionTexts.forEach(function(vt) {
|
||||||
|
vt.style.color = 'black';
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user