const container = document.getElementById('container');
const target = document.getElementById('target');
document.body.style.setProperty('--main-color', '#FF9636');
container.addEventListener('click', () => {
target.classList.toggle('toggle');
target.classList.toggle('sun');
target.classList.toggle('moon');
if(getComputedStyle(document.body).getPropertyValue('--main-color') == '#FF9636') {
document.getElementsByTagName('BODY')[0].style.filter ="grayscale(40%)";
document.body.style.setProperty('--main-color', '#1C3236');
} else if(getComputedStyle(document.body).getPropertyValue('--main-color') == '#1C3236') {
document.getElementsByTagName('BODY')[0].style.filter ="none";
document.body.style.setProperty('--main-color', '#FF9636');
}
});
const configAx = {
method: 'post',
url: '/usersData',
data: {
usersData: [
{
"id": 0,
"email": "test1@mail.ru",
"password": "qwerty1",
"name": "Алексей Цветков",
"image": "image/standartPhotoUser.png",
"friends": [{
"id": 5,
"name": "Павел Дуров",
"image": "image/standartPhotoUser.png"
}]
}
]
}
}
axios( configAx )