1(function ($) { 2 "use strict"; 3 // SLIDER 4 var swiper_wrapper = document.querySelector(".swiper-wrapper"); 5 if (swiper_wrapper) { 6 var swiper = new Swiper(".bg", { 7 navigation: { 8 nextEl: ".swiper-button-next", 9 prevEl: ".swiper-button-prev", 10 }, 11 }); 12 } 13})(jQuery); // Fully reference jQuery after this point. 14 15// const ajaxFilter_evento = document.getElementById( 'ajax-filter' ) 16// const siteContent_evento = document.getElementById( 'site-content' ) 17 18// if (ajaxFilter_evento) { 19// ajaxFilter_evento.querySelectorAll('input[name=categoria]').forEach(radio => { 20 21// radio.addEventListener('change', event => { 22// document.getElementById('obras-php').style.display = 'none'; 23// siteContent_evento.classList.add('is-loading'); 24// fetch('/cascudo/wp-admin/admin-ajax.php?action=ajaxfilter', { 25// method: 'POST', 26// headers: { 27// 'Content-Type': 'application/json' 28// }, 29// body: JSON.stringify({ 30// 'categoria': event.target.value 31// }), 32// }).then(response => { 33// return response.text() 34// }).then(response => { 35 36// if (response) { 37// siteContent_evento.innerHTML = response; 38// } 39// siteContent_evento.classList.remove('is-loading') 40 41// }).catch(error => { 42// console.log(error) 43// }) 44// }); 45// }); 46 47// ajaxFilter_evento.querySelectorAll('input[name=ano]').forEach(radio => { 48 49// radio.addEventListener('change', event => { 50// document.getElementById('obras-php').style.display = 'none'; 51// $categoria = document.querySelector('input[name=categoria]:checked'); 52// if($categoria == null){ $categoria = '-1';} 53// else {$categoria = $categoria.value;} 54// siteContent_evento.classList.add('is-loading'); 55// fetch('/cascudo/wp-admin/admin-ajax.php?action=ajaxfilter', { 56// method: 'POST', 57// headers: { 58// 'Content-Type': 'application/json' 59// }, 60// body: JSON.stringify({ 61// 'categoria': $categoria, 62// 'ano': event.target.value 63// }), 64// }).then(response => { 65// return response.text() 66// }).then(response => { 67 68// if (response) { 69// siteContent_evento.innerHTML = response; 70// } 71// siteContent_evento.classList.remove('is-loading') 72 73// }).catch(error => { 74// console.log(error) 75// }) 76// }); 77// }); 78// } 79 80// const ajaxFilter_evento = document.getElementById('ajax-filter'); 81// const siteContent_evento = document.getElementById('site-content'); 82 83// let page = 1; 84// let loading = false; 85// let allPostsLoaded = false; 86 87// function loadMorePosts(categoria, ano) { 88// if (loading || allPostsLoaded) return; 89// loading = true; 90 91// fetch('/cascudo/wp-admin/admin-ajax.php?action=ajaxfilter', { 92// method: 'POST', 93// headers: { 94// 'Content-Type': 'application/json' 95// }, 96// body: JSON.stringify({ 97// 'categoria': categoria, 98// 'ano': ano, 99// }), 100// }).then(response => { 101// return response.text(); 102// }).then(response => { 103// if (response) { 104// siteContent_evento.innerHTML += response; 105// loading = false; 106 107// // Verifica se todas as postagens disponÃveis foram carregadas 108// if (response.trim().length === 0) { 109// allPostsLoaded = true; 110// } 111// } 112// }).catch(error => { 113// console.log(error); 114// loading = false; 115// }); 116// } 117 118// function isNearBottomOfPage() { 119// const scrollTop = window.pageYOffset || document.documentElement.scrollTop; 120// const windowHeight = window.innerHeight; 121// const bodyHeight = document.body.offsetHeight; 122// const bottomThreshold = 100; 123 124// return scrollTop > bodyHeight - windowHeight - bottomThreshold; 125// } 126 127// if (ajaxFilter_evento) { 128// ajaxFilter_evento.querySelectorAll('input[name=categoria]').forEach(radio => { 129// radio.addEventListener('change', event => { 130// const categoria = event.target.value; 131// const ano = '-1'; 132 133// siteContent_evento.innerHTML = ''; // Limpa o conteúdo atual 134// page = 1; // Reinicia a página para a primeira página 135// loading = false; // Reinicia o estado de carregamento 136// allPostsLoaded = false; // Reinicia o estado de todas as postagens carregadas
137// loadMorePosts(categoria, ano); 138// }); 139// }); 140// ajaxFilter_evento.querySelectorAll('input[name=ano]').forEach(radio => { 141// radio.addEventListener('change', event => { 142// const categoria = document.querySelector('input[name=categoria]:checked') ? document.querySelector('input[name=categoria]:checked').value : '-1'; 143// const ano = event.target.value; 144 145// siteContent_evento.innerHTML = ''; // Limpa o conteúdo atual 146// page = 1; // Reinicia a página para a primeira página 147// loading = false; // Reinicia o estado de carregamento 148// allPostsLoaded = false; // Reinicia o estado de todas as postagens carregadas 149// loadMorePosts(categoria, ano); 150// }); 151// }); 152 153// // Monitora o evento de rolagem da página 154// window.addEventListener('scroll', () => { 155// if (isNearBottomOfPage()) { 156// const categoria = document.querySelector('input[name=categoria]:checked') ? document.querySelector('input[name=categoria]:checked').value : '-1'; 157// const ano = document.querySelector('input[name=ano]:checked') ? document.querySelector('input[name=ano]:checked').value : '-1'; 158// loadMorePosts(categoria, ano); 159// } 160// }); 161// }
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.