-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
35 lines (31 loc) · 1.09 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
document.addEventListener('DOMContentLoaded', () => {
const loginForm = document.querySelector('#login');
const signUpForm = document.querySelector('#sign-up');
document.querySelector('#linkLogin')
.addEventListener('click', e => {
e.preventDefault();
signUpForm.classList.add("form-hidden");
loginForm.classList.remove("form-hidden");
});
document.querySelector('#linkSignUp')
.addEventListener('click', e => {
e.preventDefault();
loginForm.classList.add("form-hidden");
signUpForm.classList.remove("form-hidden");
});
})
//Apply Theme - dark and light//
function applyTheme(){
const checkBox = document.querySelector('.switch');
const itemLight = document.querySelectorAll('.card, .form-control, .social');
if (checkBox.checked == true) {
itemLight.forEach(e => {
e.classList.add('light');
})
}
else {
itemLight.forEach(e => {
e.classList.remove('light');
})
}
}