Album

Filtros

document.addEventListener("DOMContentLoaded", function() { let filterRadios = document.querySelectorAll('.custom-filter-group input[type="radio"]'); filterRadios.forEach(function(radio) { radio.addEventListener('change', function() { filterSelection(this.id); }); }); function filterSelection(category) { let items = document.querySelectorAll('.custom-grid-wrapper .img'); if (category === 'all') { category = ''; } items.forEach(function(item) { if (item.classList.contains(category) || category === '') { item.style.display = 'block'; } else { item.style.display = 'none'; } }); } // Configuração da velocidade do scroll const SCROLL_SPEED_MULTIPLIER = 12; // Aumenta a velocidade do scroll // Habilitar scroll com roda do mouse window.addEventListener('wheel', function(e) { e.preventDefault(); const delta = e.deltaY * SCROLL_SPEED_MULTIPLIER; // Multiplicador aplicado const currentScroll = window.pageYOffset; window.scrollTo(0, currentScroll + delta); }, { passive: false }); // Habilitar scroll com touch (para dispositivos móveis) let touchStartY = 0; window.addEventListener('touchstart', function(e) { touchStartY = e.touches[0].pageY; }, { passive: true }); window.addEventListener('touchmove', function(e) { const touchY = e.touches[0].pageY; const diff = (touchStartY - touchY) * SCROLL_SPEED_MULTIPLIER; // Multiplicador aplicado window.scrollBy(0, diff); touchStartY = touchY; }, { passive: true }); filterSelection('all'); });