https://geocode-maps.yandex.ru/1.x/?apikey=YOUR_API_KEY&geocode=Тверская+6&format=json
watch --interval=5 acpi -V
sudo apt-get install acpi
function renderCartOnPage() {
const cardContent = document.querySelector('.card_popup_container_content');
// Получите массив корзины из localStorage
let cart = JSON.parse(localStorage.getItem('cart')) || [];
if (cart.length > 0) {
cardContent.innerHTML = cart.map((item) => `
<div class="cart_content__one">
<input type="hidden" value="${item.articul}">
<div class="cart_content__img">
<img src="/img/products_pictures/${item.img}">
</div>
<div class="cart_content__name">${item.name}</div>
<div class="cart_content__price">${item.price}</div>
<div class="cart_content__quantity">
<div class="quantity_minus"><button><i class="fa fa-minus" aria-hidden="true"></i></button></div>
<div class="quantity_count"><span>${item.quantity}</span></div>
<div class="quantity_plus"><button><i class="fa fa-plus" aria-hidden="true"></i></button></div>
</div>
<div class="cart_content__delete"><i class="fa fa-trash" aria-hidden="true" data-art="${item.articul}"></i></div>
</div>
`);
const plusButton = document.querySelectorAll(".quantity_plus button");
plusButton.forEach((plusItem) => {
plusItem.addEventListener('click', (event) => {
const artInput = plusItem.closest('.cart_content__one').querySelector('input[type="hidden"]');
let countSpan = plusItem.closest('.cart_content__one').querySelector('.quantity_count span');
let priceDiv = plusItem.closest('.cart_content__one').querySelector('.cart_content__price');
const articul = artInput.value;
plusFunction(articul, countSpan, priceDiv);
});
});
} else {
const cardContent = document.querySelector('.card_popup_container_content');
const div = document.createElement("div");
div.classList.add('container_content_no_lid');
cardContent.append(div);
div.innerHTML = "В корзине нет товаров";
}
}
if "FirstLocation" in response["Params"]:
index = response["Params"].index("FirstLocation")
value = response["Values"][index]
прировнять к общей длине