348
| <![CDATA[<script>
document.addEventListener('DOMContentLoaded', function () {
// import Grid from 'splide-extension-grid.min.js';
new Splide('#splide-news', {
type: 'loop',
gap: '50px',
autoplay: true,
interval: 4000,
slideFocus: false
}).mount();
/*
new Splide('.banner-govto .splide', {
type: 'loop',
gap: '50px',
autoplay: true,
interval: 5000,
arrows: false,
drag: false,
slideFocus: false
}).mount();
*/
new Splide('#splide-grid', {
type: 'loop',
height: '435px',
// cover : true,
perPage: 1,
perMove: 1,
gap: '8px',
// drag: false,
slideFocus: false,
grid: {
// You can define rows/cols instead of dimensions.
dimensions: [[2, 2], [2, 2], [2, 1], [1, 2], [2, 2], [3, 2]],
// rows: 3,
// cols: 2,
gap: {
row: '1rem',
col: '1rem',
}
},
breakpoints: {
600: {
height: '300px',
perPage: 1,
grid: {
dimensions: [[2, 2], [1, 1], [2, 1], [1, 2], [2, 2]],
}
}
},
breakpoints: {
1640: {
height: '315px',
perPage: 1,
grid: {
dimensions: [[2, 2], [2, 2], [2, 1], [1, 2], [2, 2], [3, 2]],
}
}
}
}).mount(splide.Extensions);
});
</script>]]>
|
433
| <![CDATA[<script>
$(document).ready(function () {
$('#splide-grid .splide-grid--item').magnificPopup({
delegate: 'img',
type: 'image',
gallery: {
enabled: true,
tPrev: 'Anterior (seta para esquerda)',
tNext: "Próxima (seta para direita)",
tCounter: '<span class="mfp-counter">%curr% de %total%</span>'
},
image: {
titleSrc: function (item) {
return item.el.attr('title');
}
},
callbacks: {
elementParse: function (item) { item.src = item.el.attr('src'); return false; }
}
});
$('.newslist').scroll4ever({ //scope element, must NOT be body
trigger:'.container .center-align a#next-page', // link to the next page
container:'.container > div', // element where next page items are going to be added
selector:'.container > div > .news-card', // elements to be added to the page
distance:1000, // distance to the end of window to trigger page load, if avoided, it will not auto trigger
debug: false, // if you want some messages in console...
start: function(){ $('.container a#next-page').html('Carregando...'); }, // callback called when a new page load begins, good for loading messages
complete: function(){}, // callback called when a new page load ends
});
$(window).scroll(function() {
if ($(this).scrollTop() >= 600) {
$('#return-to-top').fadeIn(200);
} else {
$('#return-to-top').fadeOut(200);
}
});
$('#return-to-top').click(function() {
$('body,html').animate({
scrollTop : 0
}, 500);
});
});
</script>]]>
|