меню
0
КАТАЛОГ
ДЛЯ БИЗНЕСА
СОЦСЕТИ
ИНФОРМАЦИЯ
закрыть
© 2026 sanpuru.
INSTAGRAM
VK
Управление файлами cookie
Продолжая использовать сайт, вы соглашаетесь на обработку файлов Cookie на условиях, указанных в Политике обработки персональных данных
OK
SYS.ARCHIVE
COLS 3

${p.name}

${p.price}

`; grid.appendChild(el); }); } function updateGrid() { const isMobile = window.innerWidth <= 640; grid.style.setProperty('--tp-cols', state.cols); grid.style.setProperty('--tp-mobile-cols', state.mobileCols); document.getElementById('tp-size-label').textContent = 'COLS ' + (isMobile ? state.mobileCols : state.cols); } document.getElementById('tp-size-plus').onclick = () => { if(window.innerWidth > 640) {state.cols = Math.min(state.cols + 1, 6); updateGrid();} else {state.mobileCols = Math.min(state.mobileCols + 1, 2); updateGrid();} }; document.getElementById('tp-size-minus').onclick = () => { if(window.innerWidth > 640) {state.cols = Math.max(state.cols - 1, 1); updateGrid();} else {state.mobileCols = Math.max(state.mobileCols - 1, 1); updateGrid();} }; document.querySelectorAll('.tp-cat__nav-link').forEach(b => b.onclick = (e) => { document.querySelectorAll('.tp-cat__nav-link').forEach(x => x.classList.remove('tp-cat__nav-link--active')); e.target.classList.add('tp-cat__nav-link--active'); state.category = e.target.dataset.category; render(); }); document.querySelectorAll('.tp-cat__filter-btn').forEach(b => b.onclick = (e) => { document.querySelectorAll('.tp-cat__filter-btn').forEach(x => x.classList.remove('tp-cat__filter-btn--active')); e.target.classList.add('tp-cat__filter-btn--active'); state.gender = e.target.dataset.filter; render(); }); render(); updateGrid(); })();