1/* ============================================================================= 2 KHá»I TẠO KHá»I TRÃNH CHIẾU ÄẦU TRANG (Swiper) â TRANG CHỦ MÃY TÃNH 3 Cặp vá»i: QIWEB_BO ⦠ViewComponents/HomeTabViewComponents.cs â view TieuDiemRp 4 Pages/Shared/Partials/_TieuDiemRp.cshtml (markup) 5 wwwroot/App_Themes/all/allcss/qi-trinh-chieu.css (kiá»u dáng) 6 7 Thay cho bá» `amazingslider` + `jquery1.12.4.js` cá»§a bản cÅ© (2026-08-12). Tham sá» lấy ÄÃNG bản rp 8 (`qi-home-rp.js` â napSlideTieuDiem) Äá» hai bản chạy giá»ng há»t nhau; bản rp vá»n Äã dá»±ng lại theo 9 Äúng sá» Äo trong `initslider.js`: 10 slideinterval 5000 · transition "slide" (duration 1000) · autoplay · pauseonmouseover · 11 enabletouchswipe · loop · dải ảnh nhá» á» Äáy (navspacing 8) · thanh thá»i gian. 12 13 Không có JS thì khá»i vẫn hiá»n tin Äầu (Swiper.css cho `.swiper-slide` bá» rá»ng 100%) â không trắng trang. 14 ========================================================================== */ 15(function () { 16 'use strict'; 17 18 function nap() { 19 var khung = document.querySelector('.qirp-slide'); 20 // `khung.swiper` là instance Swiper 8 gắn sẵn và o phần tá» â dùng Äá» KHÃNG khá»i tạo hai lần 21 // (hà m nà y gá»i á» cả DOMContentLoaded lẫn window.load). 22 // CÅ©ng nhá» váºy mà trên Äá»a chá» â¦rp â nÆ¡i `qi-home-rp.js` Äã khá»i tạo rá»i â tá»p nà y tá»± Äứng im. 23 if (!khung || khung.swiper || typeof window.Swiper !== 'function') return; 24 25 var nhieuTin = khung.querySelectorAll('.swiper-slide').length > 1; 26 27 // Dải ảnh nhá»: khá»i tạo TRƯá»C Äá» truyá»n và o trình chiếu chÃnh qua module thumbs. 28 var khungThumb = document.querySelector('.qirp-slide-thumb'); 29 var slideThumb = null; 30 if (khungThumb && nhieuTin) { 31 slideThumb = new window.Swiper(khungThumb, { 32 slidesPerView: 'auto', 33 spaceBetween: 8, // navspacing 8 34 freeMode: true, // kéo tay ÄÆ°á»£c như dải ảnh nhá» bản cÅ© 35 watchSlidesProgress: true, 36 slideToClickedSlide: true 37 }); 38 } 39 40 var slideChinh = new window.Swiper(khung, { 41 loop: nhieuTin, 42 speed: 1000, // slide.duration 1000 43 observer: true, 44 observeParents: true, 45 resizeObserver: true, 46 autoplay: nhieuTin ? { delay: 5000, disableOnInteraction: false, pauseOnMouseEnter: true } : false, 47 navigation: { 48 prevEl: khung.querySelector('.swiper-button-prev'), 49 nextEl: khung.querySelector('.swiper-button-next') 50 }, 51 pagination: { el: khung.querySelector('.qirp-slide-timer'), type: 'progressbar' }, 52 thumbs: slideThumb ? { swiper: slideThumb } : undefined, 53 keyboard: { enabled: true }, 54 a11y: { prevSlideMessage: 'Tin trưá»c', nextSlideMessage: 'Tin sau' } 55 }); 56 57 window.addEventListener('resize', function () { 58 if (slideThumb) slideThumb.update(); 59 slideChinh.update(); 60 }); 61 } 62 63 if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', nap); 64 else nap(); 65 // Swiper nạp bằng `defer` có thá» xong SAU tá»p nà y â thá» lại lúc window load (hà m tá»± chặn chạy Äôi). 66 window.addEventListener('load', nap); 67})();
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.