1jQuery(document).ready(function($) { 2 "use strict" 3 4 5 // ------- Navigation ------- // 6 if ($('ul.nav li.dropdown').length) { 7 $('ul.nav li.dropdown').on('hover', function() { 8 $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500); 9 }, function() { 10 $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500); 11 }); 12 } 13 // ------- Navigation End ------- // 14 15 16 // ------- Home Slider Start ------- // 17 if ($('#home-slider').length) { 18 $('#home-slider').owlCarousel({ 19 loop: true, 20 margin: 0, 21 nav: false, 22 items: 1, 23 autoplay: true, 24 autoplayHoverPause: true, 25 autoplaySpeed: 3000, 26 autoHeight:true, 27 28 }) 29 } 30 // ------- Home Slider End ------- // 31 32 33 // ------- Home Slider Start ------- // 34 if ($('#highlight-slider').length) { 35 $('#highlight-slider').owlCarousel({ 36 loop: true, 37 margin: 10, 38 dots:false, 39 responsiveClass: true, 40 autoplay: true, 41 autoplayHoverPause: true, 42 responsive: { 43 0: { 44 items: 1, 45 nav: false, 46 loop: true, 47 }, 48 400: { 49 items: 2, 50 nav: false, 51 loop: true, 52 }, 53 600: { 54 items: 3, 55 nav: false, 56 loop: true, 57 }, 58 1000: { 59 items: 4, 60 nav: false, 61 loop: true, 62 }, 63 1200: { 64 items: 5, 65 nav: false, 66 loop: true 67 } 68 } 69 }) 70 } 71 // ------- Home Slider End ------- // 72 73 74 // ------- Home Slider Start ------- // 75 if ($('#highlight-slider-2').length) { 76 $('#highlight-slider-2').owlCarousel({ 77 loop: false, 78 margin: 30, 79 dots:false, 80 responsiveClass: true, 81 autoplay: true, 82 autoplayHoverPause: true, 83 responsive: { 84 0: { 85 items: 1, 86 nav: false, 87 loop: true, 88 }, 89 400: { 90 items: 2, 91 nav: false, 92 loop: false, 93 }, 94 600: { 95 items: 2, 96 nav: false, 97 loop: false, 98 }, 99 1000: { 100 items: 3, 101 nav: false, 102 loop: false, 103 } 104 } 105 }) 106 } 107 // ------- Home Slider End ------- // 108 109 110 111 // ------- Pretty Photo Start ------- // 112 if ($('.gallery').length) { 113 $("area[data-rel^='prettyPhoto']").prettyPhoto(); 114 $(".gallery a[data-rel^='prettyPhoto']").prettyPhoto({ 115 animation_speed: 'normal', 116 theme: 'dark_rounded', 117 allow_resize: true, 118 slideshow: 3000, 119 autoplay_slideshow: false, 120 social_tools: '', 121 }); 122 123 } 124 // ------- Pretty Photo End ------- // 125 126 127 128 129 130 131 132 // ------- Event Slider Start ------- // 133 if ($('.recent-event-slider').length) { 134 $('.recent-event-slider').slick({ 135 slidesToShow: 1, 136 slidesToScroll: 1, 137 arrows: false, 138 autoplay: true, 139 adaptiveHeight: true 140 }); 141 $('.recent-event-slider-nav').slick({ 142 slidesToShow: 4, 143 slidesToScroll: 1, 144 asNavFor: '.recent-event-slider', 145 dots: false, 146 centerMode: false, 147 focusOnSelect: true, 148 }); 149 } 150 // ------- Event Slider End ------- // 151 152 153 // ------- Home Slider Start ------- // 154 if ($('#h3team-slider').length) { 155 $('#h3team-slider').owlCarousel({ 156 loop: true, 157 nav: true, 158 margin: 30, 159 autoplay: true, 160 dots: false, 161 responsiveClass: true, 162 autoHeight:true, 163 responsive: { 164 0: { 165 items: 1, 166 nav: true 167 }, 168 600: { 169 items: 2, 170 nav: true 171 }, 172 1000: { 173 items: 3, 174 nav: true, 175 loop: true 176 }, 177 1200: { 178 items: 5, 179 nav: true, 180 loop: true 181 }, 182 1400: { 183 items: 6, 184 nav: true, 185 loop: true 186 } 187 } 188 }) 189 } 190 // ------- Home Slider End ------- // 191 192 if ($('#h3team-slider-2').length) { 193 $('#h3team-slider-2').owlCarousel({ 194 loop: true, 195 margin: 30, 196 autoplay: true, 197 dots: false, 198 responsiveClass: true, 199 autoHeight:true, 200 responsive: { 201 0: { 202 items: 1, 203 loop: true 204 }, 205 600: { 206 items: 2, 207 loop: true 208 }, 209 1000: { 210 items: 3, 211 loop: true 212 }, 213 1200: { 214 items: 4, 215 loop: true 216 }, 217 1400: { 218 items: 4, 219 loop: true 220 } 221 } 222 }) 223 } 224 225 226 227 // ------- Close Btn ------- // 228 if ($('#closebtn').length) { 229 $('#closebtn').on('click', function() { 230 $('#closetopbar').slideUp().empty(); 231 }); 232 233 $(function() { 234 $('#closetopbar').slideDown(); 235 }); 236 } 237 // ------- Close Btn ------- // 238 239 240 241 // ------- Events Counter ------- // 242 if ($('#defaultCountdown').length) { 243 var austDay = new Date(); 244 austDay = new Date(2019, 12, 18, 14); 245 $('#defaultCountdown').countdown({ 246 until: austDay 247 }); 248 $('#year').text(austDay.getFullYear()); 249 } 250 251 252 // ------- Filter Gallery Start ------- // 253 if ($('.filter-gallery').length) { 254 if ($('.filter-gallery .isotope').length) { 255 var $container = $('.filter-gallery .isotope'); 256 $container.isotope({ 257 itemSelector: '.item', 258 transitionDuration: '0.6s', 259 masonry: { 260 columnWidth: $container.width() / 12 261 }, 262 layoutMode: 'masonry' 263 }); 264 $(window).on("resize", function() { 265 $container.isotope({ 266 masonry: { 267 columnWidth: $container.width() / 12 268 } 269 }); 270 }); 271 } 272 if ($('.filter-gallery #filters').length) { 273 $('.filter-gallery #filters').on('click', 'button', function() { 274 var filterValue = $(this).attr('data-filter'); 275 $container.isotope({ 276 filter: filterValue 277 }); 278 }); 279 // change is-checked class on buttons 280 $('.filter-gallery .button-group').each(function(i, buttonGroup) { 281 var $buttonGroup = $(buttonGroup); 282 $buttonGroup.on('click', 'button', function() { 283 $buttonGroup.find('.is-checked').removeClass('is-checked'); 284 $(this).addClass('is-checked'); 285 }); 286 }); 287 288 } 289 } 290 291 // ------- Classic Gallery ------- // 292 293 if ($('.classic-gallery').length) { 294 if ($('.classic-gallery .isotope').length) { 295 var $container = $('.classic-gallery .isotope'); 296 $container.isotope({ 297 itemSelector: '.item', 298 transitionDuration: '0.6s', 299 masonry: { 300 columnWidth: $container.width() / 12 301 }, 302 layoutMode: 'masonry' 303 }); 304 $(window).on("resize", function() { 305 $container.isotope({ 306 masonry: { 307 columnWidth: $container.width() / 12 308 } 309 }); 310 }); 311 } 312 } 313 314 315 // ------- Filter Gallery End ------- // 316 317 318 319 320 // ------- Testimonials Page Slider Start ------- // 321 if ($('#h3testimonials').length) { 322 $('#h3testimonials').owlCarousel({ 323 loop: true, 324 margin: 30, 325 responsiveClass: true, 326 autoHeight: true, 327 autoplay: true, 328 center: true, 329 responsive: { 330 0: { 331 items: 1, 332 }, 333 600: { 334 items: 2, 335 }, 336 1000: { 337 items: 3, 338 loop: true, 339 } 340 } 341 }) 342 } 343 344 // ------- Testimonials 2nd Option ------- // 345 346 if ($('#testimonials').length) { 347 $('#testimonials').owlCarousel({ 348 loop: true, 349 margin: 30, 350 responsiveClass: true, 351 autoHeight: true, 352 autoplay: true, 353 responsive: { 354 0: { 355 items: 1, 356 }, 357 600: { 358 items: 2, 359 }, 360 1000: { 361 items: 4, 362 loop: true, 363 } 364 } 365 }) 366 } 367 // ------- Testimonials Page Slider End ------- // 368 369 370 371 // ------- Counter Start ------- // 372 if ($('.countdown').length) { 373 var austDay = new Date(); 374 austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26); 375 $('.countdown').countdown({ 376 until: austDay 377 }); 378 $('#year').text(austDay.getFullYear()); 379 } 380 // ------- Counter End ------- // 381 382 // ------- Search Overlay Start ------- // 383 if ($('a[href="#search"]').length) { 384 $(function() { 385 $('a[href="#search"]').on('click', function(event) { 386 event.preventDefault(); 387 $('#search').addClass('open'); 388 $('#search > form > input[type="search"]').focus(); 389 }); 390 $('#search, #search button.close').on('click keyup', function(event) { 391 if (event.target == this || event.target.className == 'close' || event.keyCode == 27) { 392 $(this).removeClass('open'); 393 } 394 }); 395 $('form').submit(function(event) { 396 397 }) 398 }); 399 } 400 401 // ------- Search Overlay End ------- // 402 403 if ($('#dismiss, .overlay').length) { 404 $('#dismiss, .overlay').on('click', function () { 405 $('#sidebar').removeClass('active'); 406 $('.overlay').removeClass('active'); 407 }); 408 409 $('#sidebarCollapse').on('click', function () { 410 $('#sidebar').addClass('active'); 411 $('.overlay').addClass('active'); 412 $('.collapse.in').toggleClass('in'); 413 $('a[aria-expanded=true]').attr('aria-expanded', 'false'); 414 }); 415 } 416 417 418}); //End 419 420 421 // ------- Site Sticky Footer Start ------- // 422 if ($('#site-footer').length) { 423 if ($('#site-footer').length) { 424 siteFooter(); 425 $(window).on('resize', function() { 426 siteFooter(); 427 }); 428 429 function siteFooter() { 430 var siteContent = $('#site-footer'); 431 var siteContentHeight = siteContent.height(); 432 var siteContentWidth = siteContent.width(); 433 434 var siteFooter = $('#call-2-action'); 435 var siteFooterHeight = siteFooter.height(); 436 var siteFooterWidth = siteFooter.width(); 437 438 console.log('Content Height = ' + siteContentHeight + 'px'); 439 console.log('Content Width = ' + siteContentWidth + 'px'); 440 console.log('Footer Height = ' + siteFooterHeight + 'px'); 441 console.log('Footer Width = ' + siteFooterWidth + 'px'); 442 443 siteContent.css({ 444 "margin-bottom": siteFooterHeight + 50 445 }); 446 }; 447 } 448 } 449 // ------- Site Sticky Footer End ------- // 450 451$(document).ready(function() { 452 453 function weatherBallon() { 454 fetch('https://riudellots.cat/_dades_weathercloud.php') 455 .then(function(resp) { return resp.json(); }) 456 .then(function(data) { 457 if (data.status === 'success') {
458 drawWeather(data); 459 } 460 }) 461 .catch(function(err) { 462 console.error('Error cargando datos meteo:', err); 463 }); 464 } 465 466 function drawWeather(d) { 467 var temp = Math.round(d.temp); 468 var pres = d.pres; 469 var hum = d.hum; 470 var icon = d.icon_class; 471 472 document.getElementById('temp').innerHTML = '<strong>' + temp + '°C</strong>'; 473 document.getElementById('temp2').innerHTML = '<strong>' + temp + '°C</strong>'; 474 475 document.getElementById('pres').innerHTML = 'Pressió: <strong>' + pres + '</strong>hPa'; 476 document.getElementById('pres2').innerHTML = 'Pressió: <strong>' + pres + '</strong>hPa'; 477 478 document.getElementById('hum').innerHTML = 'Humitat: <strong>' + hum + '</strong>%'; 479 document.getElementById('hum2').innerHTML = 'Humitat: <strong>' + hum + '</strong>%'; 480 481 // Icono con Weather Icons (librerÃa wi) en lugar de imagen PNG de OWM 482 var iconHtml = '<i class="wi ' + icon + '" style="font-size:25px;" title="Temps a Riudellots de la Selva"></i>'; 483 document.getElementById('icono').innerHTML = iconHtml; 484 document.getElementById('icono2').innerHTML = iconHtml; 485 } 486 487 window.onload = function() { 488 weatherBallon(); 489 }; 490 491}); 492
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.