1jQuery(document).ready(function ($) { 2 "use strict"; 3 4 var swiper = new Swiper(".mySwiper", { 5 loop: true, 6 spaceBetween: 10, 7 slidesPerView: 2, 8 freeMode: true, 9 watchSlidesProgress: true, 10 breakpoints: { 11 0: { 12 slidesPerView: 1, 13 }, 14 767: { 15 slidesPerView: 1, 16 }, 17 1024: { 18 slidesPerView: 2, 19 }, 20 }, 21 }); 22 var swiper2 = new Swiper(".mySwiper2", { 23 loop: true, 24 spaceBetween: 10, 25 navigation: { 26 nextEl: ".swiper-button-next", 27 prevEl: ".swiper-button-prev", 28 }, 29 thumbs: { 30 swiper: swiper, 31 }, 32 }); 33 34 35 var swiper = new Swiper(".mySwiper", { 36 spaceBetween: 10, 37 slidesPerView: 2, 38 freeMode: true, 39 watchSlidesProgress: true, 40 breakpoints: { 41 0: { 42 slidesPerView: 1, 43 }, 44 767: { 45 slidesPerView: 1, 46 }, 47 1024: { 48 slidesPerView: 2, 49 }, 50 }, 51 }); 52 var swiper2 = new Swiper(".mySwiper2", { 53 spaceBetween: 10, 54 navigation: { 55 nextEl: ".swiper-button-next", 56 prevEl: ".swiper-button-prev", 57 }, 58 thumbs: { 59 swiper: swiper, 60 }, 61 }); 62 63 64 /**------------------------------------------------- 65 *Fixed Header 66 *----------------------------------------------------**/ 67 $(window).on('scroll', function () { 68 69 /**Fixed header**/ 70 if ($(window).scrollTop() > 250) { 71 $('.navbar-sticky').addClass('sticky fade_down_effect'); 72 } else { 73 $('.navbar-sticky').removeClass('sticky fade_down_effect'); 74 } 75 }); 76 77 78 /* ----------------------------------------------------------- */ 79 /* Menu 80 /* ----------------------------------------------------------- */ 81 $('.dropdown > a').on('click', function (e) { 82 e.preventDefault(); 83 if ($(window).width() > 991) { 84 location.href = this.href; 85 } 86 var dropdown = $(this).parent('.dropdown'); 87 dropdown.find('>.dropdown-menu').slideToggle('show'); 88 $(this).toggleClass('opened'); 89 return false; 90 }); 91 92 $('.digiqole-elementskit-menu').each(function () { 93 $(this).parents('.navbar').addClass('digiqole-elementskit-menu-container'); 94 }); 95 96 /*========================================================== 97 39. scroll bar 98 ======================================================================*/ 99 100 101 /* ----------------------------------------------------------- */ 102 /* tooltip 103 /* ----------------------------------------------------------- */ 104 $(document).ready(function () { 105 $('[data-toggle="tooltip"]').tooltip(); 106 }); 107 108 /*========================================================== 109 search popup 110 ======================================================================*/ 111 if ($('.xs-modal-popup').length > 0) { 112 $('.xs-modal-popup').magnificPopup({ 113 type: 'inline', 114 fixedContentPos: false, 115 fixedBgPos: true, 116 overflowY: 'auto', 117 closeBtnInside: false, 118 callbacks: { 119 beforeOpen: function beforeOpen() { 120 this.st.mainClass = "my-mfp-slide-bottom xs-promo-popup"; 121 } 122 } 123 }); 124 } 125 126 /* ----------------------------------------------------------- */ 127 /* Video popup 128 /* ----------------------------------------------------------- */ 129 130 if ($('.ts-play-btn').length > 0) { 131 $('.ts-play-btn').magnificPopup({ 132 type: 'iframe', 133 mainClass: 'mfp-with-zoom', 134 zoom: { 135 enabled: true, // By default it's false, so don't forget to enable it 136 137 duration: 300, // duration of the effect, in milliseconds 138 easing: 'ease-in-out', // CSS transition easing function 139 140 opener: function (openerElement) { 141 return openerElement.is('img') ? openerElement : openerElement.find('img'); 142 } 143 } 144 }); 145 } 146 147 if ($('.play-btn').length > 0) { 148 $('.play-btn').magnificPopup({ 149 type: 'iframe', 150 mainClass: 'mfp-with-zoom', 151 zoom: { 152 enabled: true, // By default it's false, so don't forget to enable it 153 154 duration: 300, // duration of the effect, in milliseconds 155 easing: 'ease-in-out', // CSS transition easing function 156 157 opener: function (openerElement) { 158 return openerElement.is('img') ? openerElement : openerElement.find('img'); 159 } 160 } 161 }); 162 } 163 164 165 /* ----------------------------------------------------------- */ 166 /* Back to top 167 /* ----------------------------------------------------------- */ 168 169 $(window).on('scroll', function () { 170 if ($(window).scrollTop() > $(window).height()) { 171 $(".BackTo").fadeIn('slow'); 172 } else { 173 $(".BackTo").fadeOut('slow'); 174 } 175 176 }); 177 $("body, html").on("click", ".BackTo", function (e) { 178 e.preventDefault(); 179 $('html, body').animate({ 180 scrollTop: 0 181 }, 800); 182 }); 183 184 /*========================================================== 185 related post slider 186 ======================================================================*/ 187 188 related_post_slider($); 189 190 191 /*========================================================== 192 category feature slider 193 ======================================================================*/ 194 $(function () { 195 let slide_loop = false;
196 let slide_autoplay = true; 197 let slide_autoplay_delay = 2500; 198 let slider_space_between = 30; 199 new Swiper('.category-feature-slider', { 200 slidesPerView: 1, 201 centeredSlides: false, 202 spaceBetween: slider_space_between, 203 loop: slide_loop, 204 slidesPerGroup: 1, 205 wrapperClass: 'swiper-wrapper', 206 slideClass: 'swiper-slide', 207 grabCursor: false, 208 allowTouchMove: true, 209 speed: 1200, //slider transition speed 210 parallax: true, 211 autoplay: slide_autoplay ? {delay: slide_autoplay_delay} : false, 212 effect: 'slide', 213 mousewheelControl: 1, 214 pagination: { 215 el: '.swiper-pagination', 216 type: 'bullets', 217 dynamicBullets: true, 218 clickable: true, 219 }, 220 navigation: { 221 nextEl: '.swiper-next-button', 222 prevEl: '.swiper-prev-button', 223 }, 224 225 }); 226 }); 227 228 229 /*========================================================== 230 scroll bar 231 ======================================================================*/ 232 233 $('.video-tab-list .post-tab-list li').on('click', function () { 234 $('.video-index').html($(this).data('index')); 235 }); 236 237 if ($(".video-tab-scrollbar").length > 0) { 238 239 $(".video-tab-scrollbar").mCustomScrollbar({ 240 mouseWheel: true, 241 scrollButtons: { 242 enable: true 243 } 244 }); 245 246 } 247 248 /*========================================================== 249 review rating circle 250 ======================================================================*/ 251 $(function () { 252 $('.review-chart').easyPieChart({ 253 scaleColor: "", 254 lineWidth: 5, 255 lineCap: 'butt', 256 barColor: '#1abc9c', 257 trackColor: "rgba(34,34,34, .4)", 258 size: 70, 259 animate: 70 260 }); 261 }); 262 263 /*========================================================== 264 reading progressbar 265 ======================================================================*/ 266 267 window.onscroll = function () { 268 reading_progressbar() 269 }; 270 271 function reading_progressbar() { 272 var digiqole_winScroll = document.body.scrollTop || document.documentElement.scrollTop; 273 var digiqole_height = document.documentElement.scrollHeight - document.documentElement.clientHeight; 274 var digiqole_scrolled = (digiqole_winScroll / digiqole_height) * 100; 275 if (document.getElementById("readingProgressbar")) { 276 document.getElementById("readingProgressbar").style.width = digiqole_scrolled + "%"; 277 } 278 } 279 280 reading_progress_bar_post(); 281 282 function reading_progress_bar_post() { 283 var progressWrap = $('.digiqole_progress_container'); 284 var entry_top = $('.entry-content'); 285 286 if (entry_top.length > 0) { 287 if (progressWrap.length > 0) { 288 var didScroll = false, 289 windowWrap = $(window), 290 291 contentWrap = $('.entry-content'), 292 contentHeight = contentWrap.height(), 293 windowHeight = windowWrap.height() * .85; 294 295 $(window).scroll(function () { 296 didScroll = true; 297 }); 298 299 $(window).on('resize', function () { 300 windowHeight = windowWrap.height() * .85; 301 progressReading(); 302 }); 303 304 setInterval(function () { 305 if (didScroll) { 306 didScroll = false; 307 progressReading(); 308 } 309 }, 150); 310 311 var progressReading = function () { 312 313 var windowScroll = windowWrap.scrollTop(), 314 contentOffset = contentWrap.offset().top, 315 contentScroll = (windowHeight - contentOffset) + windowScroll, 316 progress = 0; 317 318 if (windowHeight > contentHeight + contentOffset) { 319 progressWrap.find('.progress-bar').width(0); 320 } else { 321 if (contentScroll > contentHeight) { 322 progress = 100; 323 } else if (contentScroll > 0) { 324 progress = (contentScroll / contentHeight) * 100; 325 326 } 327 328 progressWrap.find('.progress-bar').width(progress + '%'); 329 } 330 } 331 } 332 } else { 333 return false;
334 } 335 } 336 337 /* ----------------------------------------------------------- */ 338 /*sticky sidebar 339 /* ----------------------------------------------------------- */ 340 sticky_sidebar($); 341 342 343 /* ----------------------------------------------------------- */ 344 /*single post gallery slider 345 /* ----------------------------------------------------------- */ 346 $(function () { 347 let $container = $('.single-post-gallery-wrap'); 348 if ($container.length > 0) { 349 let slides_to_show = 4; 350 let slider_space_between = 10; 351 // eslint-disable-next-line 352 var galleryTop = new Swiper(".single-post-sync-slider1", { 353 loop: true, 354 loopedSlides: 5, //looped slides should be the same 355 thumbs: { 356 swiper: new Swiper('.sync-slider2', { 357 spaceBetween: slider_space_between, 358 slidesPerView: slides_to_show, 359 loop: true, 360 freeMode: true, 361 loopedSlides: 5, //looped slides should be the same 362 watchSlidesVisibility: true, 363 watchSlidesProgress: true, 364 breakpoints: { 365 0: { 366 slidesPerView: 1, 367 }, 368 767: { 369 slidesPerView: 2, 370 }, 371 1024: { 372 slidesPerView: 3, 373 }, 374 }, 375 }), 376 }, 377 }); 378 } 379 }); 380 381 /*========================================================== 382 Preloader 383 ======================================================================*/ 384 $(window).on('load', function () { 385 386 setTimeout(() => { 387 $('#preloader').addClass('loaded'); 388 }, 1000); 389 390 }); 391 392 // preloader close 393 $('.preloader-cancel-btn').on('click', function (e) { 394 e.preventDefault(); 395 if (!($('#preloader').hasClass('loaded'))) { 396 $('#preloader').addClass('loaded'); 397 } 398 }); 399 400 401 /*========================================================== 402 scroll 403 ======================================================================*/ 404 405 $.fn.isInViewport = function () { 406 let elementTop = $(this).offset().top; 407 let elementBottom = elementTop + $(this).outerHeight(); 408 409 let viewportTop = $(window).scrollTop(); 410 let viewportBottom = viewportTop + $(window).height(); 411 412 return elementBottom > viewportTop && elementTop < viewportBottom; 413 }; 414 415 416 $(window).on('scroll', function () { 417 418 $('.ajax-loader-current-url').each(function () { 419 if ($(this).isInViewport()) { 420 var current_url = $(this).data('current-url'); 421 if (window.location.href != current_url) { 422 window.history.pushState('html', 'title', current_url); 423 } 424 } 425 }); 426 427 $('.blog-ajax-load-more-trigger').each(function (index) { 428 if ($(this).isInViewport()) { 429 var current_post = index + 1; 430 var _this = $(this); 431 var next_post_url = $(this).data('next-post-url'); 432 var max_posts = $(this).data('max-posts'); 433 var content_loaded = $(this).data('content-loaded'); 434 435 if (current_post >= max_posts) { 436 _this.fadeOut(2000); 437 return; 438 } 439 440 if (content_loaded == 'no') { 441 $.ajax({ 442 type: "GET", 443 url: next_post_url, 444 success: function (content) { 445 var content = $(content).find('#blog-ajax-load-more-container').html(); 446 _this.after(content); 447 related_post_slider($); 448 sticky_sidebar($); 449 } 450 }); 451 } 452 _this.fadeOut(2000); 453 _this.data('content-loaded', 'yes'); 454 } 455 }); 456 }); 457 /*--------------scroll end---------*/ 458 459 460 /*========================================================== 461 Dark-light mode 462 ======================================================================*/ 463 $(document).on('click', '.change-mode', function () { 464 465 var defaultSkin = $('html').data('skin'), 466 siteSkin = 'light'; 467 468 if ($('html').hasClass('dark-mode')) { 469 siteSkin = 'dark'; 470 } 471
472 var switchTo = (siteSkin == 'dark') ? 'light' : 'dark'; 473 if ('undefined' != typeof localStorage) { 474 localStorage.setItem('digi-skin', switchTo); 475 } 476 477 if (defaultSkin == switchTo) { 478 $('html').removeClass('digi-skin-switch'); 479 } else { 480 $('html').addClass('digi-skin-switch'); 481 } 482 483 if (switchTo == 'dark') { 484 $('html').addClass('dark-mode'); 485 } else { 486 $('html').removeClass('dark-mode'); 487 } 488 }); 489 490 const loadScripts_PreloadTimer = setTimeout(triggerScriptLoader_Preload, 8e3), 491 userInteractionEvents_Preload = ["mouseover", "keydown", "touchstart", "touchmove", "wheel"]; 492 493 function triggerScriptLoader_Preload() { 494 document.querySelector("html").classList.add("is-active-page"), clearTimeout(loadScripts_PreloadTimer) 495 } 496 497 userInteractionEvents_Preload.forEach(function (e) { 498 window.addEventListener(e, triggerScriptLoader_Preload, { 499 passive: !0 500 }) 501 }); 502 503 504 if (typeof fontList !== 'undefined' && fontList == true) { 505 const observeFontList = fontList.map((fontName) => { 506 const observer = new FontFaceObserver(fontName); 507 return observer.load(); 508 }); 509 510 Promise.all(observeFontList).then(function () { 511 document.documentElement.className += " fonts-loaded"; 512 }); 513 } else { 514 const barlowObserver = new FontFaceObserver('Barlow'); 515 const robotoObserver = new FontFaceObserver('Roboto'); 516 Promise.all([ 517 barlowObserver.load(), 518 robotoObserver.load() 519 ]).then(function () { 520 document.documentElement.className += " fonts-loaded"; 521 }); 522 523 } 524 525}); 526 527// Related post slider function 528 529function related_post_slider($) { 530 let slide_loop = true; 531 let slide_autoplay = true; 532 let slide_autoplay_delay = 2500; 533 let slider_space_between = 30; 534 new Swiper('.popular-grid-slider', { 535 slidesPerView: 3, 536 centeredSlides: false, 537 spaceBetween: slider_space_between, 538 loop: slide_loop, 539 slidesPerGroup: 1, 540 wrapperClass: 'swiper-wrapper', 541 slideClass: 'swiper-slide', 542 grabCursor: false, 543 allowTouchMove: true, 544 speed: 1200, //slider transition speed 545 parallax: true, 546 autoplay: slide_autoplay ? {delay: slide_autoplay_delay} : false, 547 effect: 'slide', 548 mousewheelControl: 1, 549 pagination: { 550 el: '.swiper-pagination', 551 type: 'bullets', 552 dynamicBullets: true, 553 clickable: true, 554 }, 555 navigation: { 556 nextEl: '.swiper-next-button', 557 prevEl: '.swiper-prev-button', 558 }, 559 breakpoints: { 560 0: { 561 slidesPerView: 1, 562 slidesPerGroup: 1, 563 }, 564 767: { 565 slidesPerView: 2, 566 slidesPerGroup: 1, 567 }, 568 1024: { 569 slidesPerView: 3, 570 slidesPerGroup: 1, 571 }, 572 }, 573 574 }); 575 576} 577 578 579function archive_post_slider($) { 580 let slide_loop = true; 581 let slide_autoplay = true; 582 let slide_autoplay_delay = 2500; 583 let slider_space_between = 30; 584 new Swiper('.archive-post-slider', { 585 slidesPerView: 4, 586 centeredSlides: false, 587 spaceBetween: slider_space_between, 588 loop: slide_loop, 589 slidesPerGroup: 1, 590 wrapperClass: 'swiper-wrapper', 591 slideClass: 'swiper-slide', 592 grabCursor: false, 593 allowTouchMove: true, 594 speed: 1200, //slider transition speed 595 parallax: true, 596 autoplay: slide_autoplay ? {delay: slide_autoplay_delay} : false, 597 effect: 'slide', 598 mousewheelControl: 1, 599 pagination: { 600 el: '.swiper-pagination', 601 type: 'bullets', 602 dynamicBullets: true, 603 clickable: true, 604 }, 605 navigation: { 606 nextEl: '.swiper-next-button', 607 prevEl: '.swiper-prev-button', 608 }, 609 breakpoints: { 610 0: { 611 slidesPerView: 1, 612 slidesPerGroup: 1, 613 }, 614 767: { 615 slidesPerView: 2, 616 slidesPerGroup: 1, 617 }, 618 1024: { 619 slidesPerView: 4, 620 slidesPerGroup: 1, 621 }, 622 }, 623 624 }); 625 626} 627 628archive_post_slider($); 629 630function sticky_sidebar($) { 631 if (digiqole_ajax.blog_sticky_sidebar == true) { 632 // Sticky sidebar 633 $('.digiqole-content > .col-lg-4, .digiqole-content > .col-lg-8').theiaStickySidebar({ 634 additionalMarginTop: 30 635 }); 636 } 637}
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.