1jQuery(function($){ 2 3 // Programa (calendar) 4 $('.js-programa').each(function(){ 5 var $container = $(this); 6 initProgramTabs( $container ); 7 initProgramPopups( $container ); 8 }); 9 10 //[Calendar] Popup Tooltip Modal 11 function initProgramPopups($container) { 12 var $popups = $container.find('.js-tooltip .js-modal'); 13 14 $(window).on('mousemove', function (e) { 15 var mouseX = e.clientX; 16 var mouseY = e.clientY; 17 18 var offsetX = 10; 19 var offsetY = 10; 20 21 var tooltipOffsetX = mouseX + offsetX; 22 var tooltipOffsetY = mouseY + offsetY; 23 24 // Solo tomar el tooltip que esté visible (display !== "none") 25 var $tooltip = $popups.filter(function () { 26 return $(this).css('display') !== 'none'; 27 28 }); 29 30 if ($tooltip.length > 0) { 31 var tooltipHeight = $tooltip.outerHeight(); 32 33 // Detectar si hay espacio abajo, si no, subir el tooltip 34 if ((mouseY + tooltipHeight + offsetY) > window.innerHeight) { 35 tooltipOffsetY = mouseY - tooltipHeight - offsetY; 36 } 37 38 // Aplicar coordenadas 39 $container.css('--x', tooltipOffsetX + 'px'); 40 $container.css('--y', tooltipOffsetY + 'px'); 41 } 42 }); 43} 44 45 // [Calendar] Tabbed Content, toggled by Date buttons 46 function initProgramTabs( $container ){ 47 var $toggles = $container.find('.js-toggle-button'); 48 var $panels = $container.find('.js-toggle-panel'); 49 $toggles.on('click', function(e){ 50 e.preventDefault(); 51 $toggles.removeClass('calendar--is-active'); 52 $(this).addClass('calendar--is-active'); 53 $panels.removeClass('calendar--is-active'); 54 var $target = $($(this).attr('data-target')); 55 $target.addClass('calendar--is-active'); 56 }); 57 } 58 59 const $restoreButton = $('#restore-active-panels'); 60 61 $restoreButton.on('click', function () { 62 $('.js-toggle-panel').addClass('calendar--is-active'); 63 $('.js-toggle-button').addClass('calendar--is-active'); 64 }); 65 66 67 // [Homepage 2023] Header fixed on scroll 68 $(window).scroll(function() { 69 if ($(this).scrollTop() > 10){ 70 $('.section-header').addClass("point--top"); 71 $('.space-header').removeClass("point--top"); 72 } 73 else{ 74 $('.section-header').removeClass("point--top"); 75 $('.space-header').addClass("point--top"); 76 } 77 }); 78 // [Homepage 2023] Menu_(mobile version) 79 $('.js-button--menu').on('click', function(e){ 80 e.preventDefault(); 81 $(this).toggleClass('state--clicked'); 82 $( ".wrapper--menu--mobile>nav" ).toggle( "slow" ); 83 console.log('memenu'); 84 }); 85 86 87 88 // eventos en vertical en board 2023 89 const eventScrollContainer = document.getElementById('event-scroll'); 90 if (eventScrollContainer !== null){ 91 const eventCards = eventScrollContainer.querySelectorAll('.card--event');
92 const separators = eventScrollContainer.querySelectorAll('.separator--line'); 93 const totalCards = eventCards.length; 94 95 eventCards.forEach((card, index) => { 96 const clonedCard = card.cloneNode(true); 97 const clonedSeparator = separators[index].cloneNode(true); 98 99 eventScrollContainer.appendChild(clonedCard); 100 eventScrollContainer.appendChild(clonedSeparator); 101 }); 102 103 const cardHeight = eventCards[0].offsetHeight; 104 const separatorHeight = separators[0].offsetHeight; 105 const totalHeight = (cardHeight + separatorHeight) * totalCards; 106 107 eventScrollContainer.style.height = `${totalHeight}px`; 108 109 const scrollSpeed = 1; // Velocidad del scroll en pÃxeles por fotograma 110 const scrollInterval = 10; // Intervalo de tiempo entre los desplazamientos (en milisegundos) 111 const scrollDelay = 2000; // Retraso antes de reiniciar el desplazamiento (en milisegundos) 112 113 let scrollPosition = 0; 114 let scrollTimeout; 115 116 function scrollUp() { 117 scrollPosition += scrollSpeed; 118 eventScrollContainer.style.transform = `translateY(-${scrollPosition}px)`; 119 120 if (scrollPosition >= totalHeight) { 121 clearTimeout(scrollTimeout); 122 scrollPosition = 0; 123 eventScrollContainer.style.transform = 'none'; 124 scrollTimeout = setTimeout(scrollUp, scrollDelay); 125 } else { 126 scrollTimeout = setTimeout(scrollUp, scrollInterval); 127 } 128 } 129 130 scrollTimeout = setTimeout(scrollUp, scrollInterval); 131 } 132 133 134 // [Homepage 2023] Slider_Section slider 135 var swiper = new Swiper(".mySwiper", { 136 autoplay: { 137 delay: 3000, 138 disableOnInteraction: false, 139 }, 140 pagination: { 141 el: ".swiper-pagination", 142 }, 143 }); 144 145 // [Homepage 2023] Slider_Section jury 146 var swiper = new Swiper(".mySwiperCentered", { 147 slidesPerView: "auto", 148 spaceBetween: 30, 149 }); 150 151 // [Homepage 2023] Slider_Section jury (desktop) 152 var swiper = new Swiper(".mySwiperCenteredDesktop", { 153 slidesPerView: 5, 154 spaceBetween: 30, 155 loop: true, 156 autoplay: { 157 delay: 3000, 158 disableOnInteraction: false, 159 }, 160 }); 161 // [Board 2023] Slider_Section Frames 162 var swiper = new Swiper(".myFrames", { 163 loop: true, 164 autoplay: { 165 delay: 14000, 166 disableOnInteraction: false, 167 }, 168 }); 169 170 // [Board 2023] Slider_Section Blog 171 var swiper = new Swiper(".myBlog", { 172 loop: true, 173 autoplay: { 174 delay: 13500, 175 disableOnInteraction: false, 176 }, 177 }); 178 179 // [Board 2023] Slider_Section Gallery 180 var swiper = new Swiper(".myGallery", { 181 loop: true, 182 autoplay: { 183 delay: 14500, 184 disableOnInteraction: false, 185 }, 186 }); 187 188 189 190});
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.