PageSourceSearch

https://ihddiyarbakir.org/public/assets/js/main.js?v=1.0.0

js ihddiyarbakir.org collected 2026-10-02 12:33:55 UTC 7,725 bytes, 238 lines download raw bytes

1$(function() {
2    if($('#main-slider').length){
3        let autoplay;
4    
5        if(parseInt($('#main-slider').data('autoplay'))){
6            autoplay = {
7                delay: parseInt($('#main-slider').data('autoplay')),
8                stopOnLastSlide: false,
9                disableOnInteraction: false
10            }
11        }else{
12            autoplay = false
13        }
14
15        const mainSlider = new Swiper('#main-slider', {
16            effect: 'fade',
17            fadeEffect: {
18                crossFade: true
19            },
20            speed: 800,
21            loop: true,
22            autoplay: autoplay,
23            pagination: {
24                el: ".slider .fraction .swiper-pagination",
25                type: "fraction",
26            },
27            navigation: {
28                nextEl: ".slider .navigation .swiper-button-next",
29                prevEl: ".slider .navigation .swiper-button-prev",
30            },
31        })
32    }
33    //x# Main Slider Init
34
35    if($('#announcement-slider').length){
36        let autoplay;
37    
38        if(parseInt($('#announcement-slider').data('autoplay'))){
39            autoplay = {
40                delay: parseInt($('#announcement-slider').data('autoplay')),
41                stopOnLastSlide: false,
42                disableOnInteraction: false
43            }
44        }else{
45            autoplay = false
46        }
47
48        const announcementSlider = new Swiper('#announcement-slider', {
49            speed: 400,
50            autoplay: autoplay,
51            effect: "slide",
52            loop: true,
53            breakpoints: {
54                375: {
55                    direction: "horizontal",
56                    autoHeight: true
57                },
58                767: {
59                    direction: "vertical"
60                }
61            }
62        })
63    }
64    //x# Announcement Slider Init
65
66    function initSwiper(sliderId, parentCls, autoplayDelay, instanceName) {
67        if ($(sliderId).length) {
68            let autoplay;
69    
70            if (parseInt($(sliderId).data('autoplay'))) {
71                autoplay = {
72                    delay: parseInt($(sliderId).data('autoplay')),
73                    stopOnLastSlide: false,
74                    disableOnInteraction: false
75                };
76            } else {
77                autoplay = autoplayDelay ? {
78                    delay: autoplayDelay,
79                    stopOnLastSlide: false,
80                    disableOnInteraction: false
81                } : false;
82            }
83    
84            window[instanceName] = new Swiper(sliderId, {
85                speed: 500,
86                autoplay: autoplay,
87                effect: "slide",
88                loop: true,
89                slidesPerView: 4,
90                spaceBetween: 24,
91                navigation: {
92                    nextEl: `${parentCls} .navigation .swiper-button-next`,
93                    prevEl: `${parentCls} .navigation .swiper-button-prev`,
94                },
95                breakpoints: {
96                    300: {
97                        slidesPerView: 1,
98                        spaceBetween: 5,
99                    },
100                    359: {
101                        slidesPerView: 2,
102                        spaceBetween: 5,
103                    },
104                    550: {
105                        slidesPerView: 2,
106                        spaceBetween: 10,
107                        autoHeight: true
108                    },
109                    1024: {
110                        slidesPerView: 3,
111                        spaceBetween: 20,
112                    },
113                    1200: {
114                        slidesPerView: 4,
115                        spaceBetween: 24,
116                    }
117                }
118            });
119        }
120    }
121    
122    initSwiper('#reports-slider', '.reports-module', false, 'reportsSlider');  //x# Reports Slider Init
123    initSwiper('#publications-slider', '.publications', false, 'publicationsSlider');  //x# Publications Slider Init
124
125    if($("#rt-calendar").length) {
126        let w = [];
127
128        $(".rt-calendar-events .event").each(function () {
129            var e = { 
130                id: 'bHay68s',
131                date: $(this).data("date"), 
132                name: $(this).data("name"), 
133                description: $(this).data("description"), 
134                type: "event", 
135                url: $(this).data("url") 
136            };
137
138            w.push(e);
139        })
140
141        console.log(w)
142
143        $("#rt-calendar").evoCalendar({ 
144            calendarEvents: w,
145            language: CURRENT_LANG != 'ku' ? CURRENT_LANG : 'en',
146            eventHeaderFormat: "d MM, yyyy"
147        });
148    }
149
150    Fancybox.bind('[data-fancybox]');
151    Fancybox.defaults.autoFocus = false;
152    Fancybox.defaults.backFocus = false;
153    Fancybox.defaults.placeFocusBack  = false;
154    Fancybox.defaults.dragToClose  = false;
155
156    if($('.page-gallery').length){
157        let $gallery, $perview, $breakpoints, $delay;
158
159        $gallery = $('.page-gallery');
160        $delay = 5000;
161
162        $gallery.each(function(e){
163            let $type = $(this).data('type');
164
165            if($type === 'video'){
166                if($gallery.parent().parent().hasClass('col-xl-12')){
167                    $perview = 4;
168                }else{
169                    $perview = 3;
170                }
171
172                $breakpoints = {
173                    340: {
174                        slidesPerView: 2,
175                        spaceBetween: 10
176                    },
177                    767: {
178                        slidesPerView: $perview,
179                        spaceBetween: 12
180                    }
181                }
182            }else{
183                if($gallery.parent().parent().hasClass('col-xl-12')){
184                    $perview = 5;
185                }else{
186                    $perview = 4;
187                }
188
189                $breakpoints = {
190                    340: {
191                        slidesPerView: 2,
192                        spaceBetween: 10
193                    },
194                    767: {
195                        slidesPerView: $perview,
196                        spaceBetween: 12
197                    }
198                }
199            }
200
201            let $option = {
202                effect: 'slide',
203                spaceBetween: 5,
204                speed: 700,
205                simulateTouch: true,
206                grid: {
207                    fill: 'row',
208                    rows: $(this).data('per-column')
209                },
210                loop: false,
211                autoplay: {
212                    delay: $delay,
213                    stopOnLastSlide: false,
214                    disableOnInteraction: false
215                },
216                pagination: {
217                    el: '.page-gallery[data-type='+ $type +'] .swiper-pagination',
218                    clickable: true,
219                    dynamicBullets: true
220                },
221                navigation: {
222                    nextEl: '.page-gallery[data-type='+ $type +'] .swiper-button-next',
223                    prevEl: '.page-gallery[data-type='+ $type +'] .swiper-button-prev'
224                },
225                breakpoints: $breakpoints
226            }
227            
228            new Swiper('.page-gallery[data-type='+ $type +'] .items .swiper', $option);
229    
230            Fancybox.bind('.page-gallery[data-type='+ $type +'] .items .swiper-slide:not(.swiper-slide-duplicate) a', {
231                groupAll : true
232            });
233
234            $delay += 1000;
235        });
236    }
237    //x# Gallery Slider Init
238})

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.