PageSourceSearch

https://www.unionmart.ru/bitrix/templates/design2025/components/bitrix/news.list/index.portfolio/script.js

js unionmart.ru collected 2026-10-01 12:37:11 UTC 1,367 bytes, 44 lines download raw bytes

1document.addEventListener('DOMContentLoaded', () => {
2
3    const sliderEl_2 = document.getElementById('portfolioSwiper');
4    const firstImg_2 = sliderEl_2.querySelector('.portfolioSwiper .portfolio-card__bg img');
5
6    function loadImage_2(img) {
7        return new Promise(resolve => {
8            if (img.complete) return resolve();
9            img.onload = resolve;
10            img.onerror = resolve;
11        });
12    }
13
14    loadImage_2(firstImg_2).then(() => {
15
16        const swiper_potrtfolio = new Swiper('#portfolioSwiper', {
17            slidesPerView: 1.2,
18            spaceBetween: 16,
19            speed: 700,
20            loop: true,
21            navigation: {
22                nextEl: '.images-side .hero-next',
23                prevEl: '.images-side .hero-prev',
24            },
25            pagination: {
26                el: '.images-side .hero-pagination',
27                clickable: true
28            },
29
30            breakpoints: {
31                576:  { slidesPerView: 2.2, spaceBetween: 20 },
32                992:  { slidesPerView: 3, spaceBetween: 30 },
33            },
34        });
35
36        // ïîñëå ïîëíîé èíèöèàëèçàöèè
37        sliderEl_2.classList.remove('is-loading');
38        sliderEl_2.classList.add('is-ready');
39
40        // óäàëÿåì placeholder — òåïåðü îí íå íóæåí
41        document.querySelector('.portfolioSwiper-placeholder').remove();
42    });
43
44});

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.