2024-09-20 14:24:47 +02:00
|
|
|
function abrirMenu()
|
2023-02-21 14:48:37 +01:00
|
|
|
{
|
2024-09-20 14:24:47 +02:00
|
|
|
document.getElementById("menu-despregable").classList.add("despregado");
|
|
|
|
}
|
|
|
|
|
|
|
|
function pecharMenu()
|
2023-02-21 14:48:37 +01:00
|
|
|
{
|
2024-09-20 14:24:47 +02:00
|
|
|
document.getElementById("menu-despregable").classList.remove("despregado");
|
|
|
|
}
|
2023-02-21 14:48:37 +01:00
|
|
|
|
2024-09-20 14:24:47 +02:00
|
|
|
const swiper_galeria = new Swiper(".galeria",
|
2023-02-21 14:48:37 +01:00
|
|
|
{
|
2024-09-20 14:24:47 +02:00
|
|
|
allowTouchMove: false,
|
2023-02-21 14:48:37 +01:00
|
|
|
slidesPerView: 1,
|
2024-09-20 14:24:47 +02:00
|
|
|
spaceBetween: 0,
|
2023-02-21 14:48:37 +01:00
|
|
|
loop: true,
|
|
|
|
autoHeight: false,
|
|
|
|
centeredSlides: true,
|
2024-09-20 14:24:47 +02:00
|
|
|
keyboard:
|
2023-02-21 14:48:37 +01:00
|
|
|
{
|
2024-09-20 14:24:47 +02:00
|
|
|
enabled: true,
|
|
|
|
onlyInViewport: false,
|
|
|
|
},
|
|
|
|
autoplay: false,
|
|
|
|
/*{
|
2023-02-21 14:48:37 +01:00
|
|
|
delay: 2500,
|
|
|
|
disableOnInteraction: false,
|
|
|
|
pauseOnMouseEnter: true,
|
2024-09-20 14:24:47 +02:00
|
|
|
},*/
|
2023-02-21 14:48:37 +01:00
|
|
|
pagination:
|
|
|
|
{
|
|
|
|
el: ".swiper-pagination",
|
|
|
|
clickable: true,
|
|
|
|
},
|
|
|
|
navigation:
|
|
|
|
{
|
|
|
|
nextEl: ".swiper-button-next",
|
|
|
|
prevEl: ".swiper-button-prev",
|
|
|
|
},
|
2024-09-20 14:24:47 +02:00
|
|
|
freeMode: false,
|
2024-10-07 11:18:13 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
document.addEventListener("click", function (e)
|
|
|
|
{
|
|
|
|
if(e.target.classList.contains("reixa-item") && window.matchMedia("(min-width: 768px)"))
|
|
|
|
{
|
|
|
|
document.body.classList.toggle('noscroll', true);
|
|
|
|
document.querySelector(".modal").setAttribute('aria-hidden', false);
|
|
|
|
document.querySelector(".modal").style.display = 'block';
|
|
|
|
document.querySelector(".modal-imaxe").src = e.target.src;
|
|
|
|
document.querySelector(".modal-imaxe").alt = e.target.alt;
|
|
|
|
document.querySelector(".modal-descripcion").textContent = e.target.alt;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(e.target.classList.contains("modal-pechar") && window.matchMedia("(min-width: 768px)"))
|
|
|
|
{
|
|
|
|
document.body.classList.toggle('noscroll', false);
|
|
|
|
document.querySelector(".modal").setAttribute('aria-hidden', true);
|
|
|
|
document.querySelector(".modal").style.display = 'none';
|
|
|
|
}
|
2024-09-20 14:24:47 +02:00
|
|
|
});
|