PageSourceSearch

https://puygaillard-de-quercy.fr/typo3temp/assets/compressed/merge…b8aac213a33d0a5abf264d4254d31.js?1743673675

js puygaillard-de-quercy.fr collected 2026-10-03 02:47:16 UTC 6,796 bytes, 235 lines download raw bytes

1
2/* 
3TODO[epic=fixedtopcarousel]: rename file / move script
4*/
5
6//* Set navbar menu to fixed position on scrolldown :
7
8var navbar = $('#navbar-menu');
9var pageContent = $('#page-content');
10var height = $('#header-carousel').height();
11
12if (TYPO3.settings.TS.navigationType == "fixedtopcarousel") {
13    $(window).scroll(function () {
14        if ($(window).width() >= 992) {
15            if ($(window).scrollTop() >= height) {
16                navbar.addClass('navbar-menu--sticky')
17                pageContent.addClass('after-menu--sticky')
18            } else {
19                navbar.removeClass('navbar-menu--sticky')
20                pageContent.removeClass('after-menu--sticky')
21            }
22        }
23    });
24}
25
26////////// SEARCHBOX
27var searchBox = document.getElementById("navsearch_box"); // doesn't work with JQuery
28var searchBoxToggle = $('#navsearch_toggle');
29var searchBoxToggle_Mobile = $('#navsearch_toggle--mobile');
30var searchboxCloseButton = $('#searchbox_closebutton');
31
32searchBoxToggle.bind('click keyup', function (e) {
33    if (e.which == 13 || e.type == "click") {
34        showSearchbox()
35    }
36});
37
38searchBoxToggle_Mobile.click(function () {
39    showSearchbox()
40});
41
42searchboxCloseButton.click(function (event) {
43    hideSearchbox(event)
44});
45
46searchBox.addEventListener('animationend', function () {
47    resetSearchbox(this)
48});
49
50// Functions :
51function showSearchbox() {
52    searchBox.style.display = "flex";
53}
54
55function hideSearchbox(e) {
56    e.preventDefault();
57    e.stopPropagation();
58    searchBox.style.display = "none";
59
60    // display searchbox again to show exit animation :
61    searchBox.classList.remove('animate__slideInRight');
62    searchBox.classList.add('animate__slideOutRight');
63    searchBox.style.display = "flex";
64}
65
66function resetSearchbox(element) {
67    if (element.classList.contains("animate__slideOutRight")) {
68        searchBox.classList.remove('animate__slideOutRight');
69        searchBox.classList.add('animate__slideInRight');
70        element.style.display = "none";
71    }
72}
73/*
74TODO[epic=fixedtopcarousel]: rename file / move script
75NOTE: bootstrap package class is used
76*/
77
78//* Set navbar to fixed top on smaller screens (when topcarousel is on display none)
79
80if (TYPO3.settings.TS.navigationType == "fixedtopcarousel") {
81    handleNavbarFixedtop()
82
83    $(window).resize(function () {
84        handleNavbarFixedtop()
85    });
86}
87
88function handleNavbarFixedtop() {
89    var navbar = $('#page-header')
90    if (window.innerWidth < 992) {
91        navbar.addClass('navbar-fixed-top');
92    } else {
93        navbar.removeClass('navbar-fixed-top');
94    }
95}
96
97$(function () {
98    if (TYPO3.settings.TS.matomoSiteId) {
99        var siteId = TYPO3.settings.TS.matomoSiteId
100        var _paq = window._paq = window._paq || [];
101        /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
102        _paq.push(['trackPageView']);
103        _paq.push(['enableLinkTracking']);
104        (function () {
105            var u = "//analytics.cdg82.fr/";
106            _paq.push(['setTrackerUrl', u + 'matomo.php']);
107            _paq.push(['setSiteId', siteId]);
108            var d = document,
109                g = d.createElement('script'),
110                s = d.getElementsByTagName('script')[0];
111            g.type = 'text/javascript';
112            g.async = true;
113            g.src = u + 'matomo.js';
114            s.parentNode.insertBefore(g, s);
115        })();
116    }
117});
118
119// // // CARDS AGENDA
120var monthCards = $(".month")
121
122monthCards.each(function(index, el) {
123    var month = $(el).attr("class").split(/\s+/)[2].substring(5);
124    var monthItems = $(".item" + month);
125    $(el).hover(function() {
126        monthItems.each(function(index, item) {
127            $(item).addClass("emphasize animate__animated animate__flipInY animate__fast")
128        });
129    });
130    $(el).mouseleave(function() {
131        monthItems.each(function(index, item) {
132            $(item).removeClass("emphasize  ")
133        });
134    });
135});
136// ON LOAD :
137
138console.log("config carousel")
139$(document).ready(function () {
140    // addCarouselPauseButton()
141    $(".owl-carousel").owlCarousel();
142    if ($(window).width() > 992) {
143        $('.responsive-owl-carousel').addClass('owl-carousel');
144        startCarousel();
145    }
146});
147
148// ON RESIZE :
149$(window).resize(function () {
150    if ($(window).width() > 992) {
151        $('.responsive-owl-carousel').addClass('owl-carousel');
152        startCarousel();
153    } else {
154        stopCarousel()
155    }
156});
157
158// FONCTIONS :
159
160function startCarousel() {
161    var owl = $('.owl-carousel');
162    owl.owlCarousel({
163        items: 3,
164        center: true,
165        nav: true,
166        navText: [
167            "<",
168            ">"
169        ],
170        dots: true,
171        loop: true,
172        margin: 10,
173        autoplay: true,
174        autoplayTimeout: 10000,
175        autoplayHoverPause: true
176    });
177}
178
179function stopCarousel() {
180    var owl = $('.owl-carousel');
181    owl.trigger('destroy.owl.carousel');
182    $('.responsive-owl-carousel').removeClass('owl-carousel');
183}
184
185function addCarouselPauseButton() {
186    $('.carousel').each(function (index, el) {
187        var pauseButton = $(el).find(".btn-stop-anim")
188        var pauseIconSrc = '/typo3conf/ext/distri_cdg82/Resources/Public/Icons/pause.svg'
189        var playIconSrc = '/typo3conf/ext/distri_cdg82/Resources/Public/Icons/play.svg'
190
191        $(pauseButton).on("click", function () {
192            if ($(this).attr('src') === pauseIconSrc) {
193                $(el).carousel('pause');
194                $(this).attr('src', playIconSrc)
195            } else {
196                $(el).carousel('cycle');
197                $(this).attr('src', pauseIconSrc)
198            }
199        });
200    });
201}
202
203/*!
204 * base theme v1.0.0 (https://www.montgaillard-de-quercy.fr)
205 * Copyright 2017-2022 t.charmasson
206 * Licensed under the GPL-2.0-or-later license
207 */
208console.log("WE LOVE TYPO3");
209
210addCarouselPlayPauseButton();
211
212function addCarouselPlayPauseButton() {
213    $(".carousel").each(function (index, el) {
214        var playPauseButton = $(el).find(".carousel-playPauseButton");
215        var pauseIcon = $(el).find(".fa-pause-circle");
216        var playIcon = $(el).find(".fa-play-circle");
217
218        $(playPauseButton).on("click", function () {
219            if (pauseIcon.css("display") == "inline-block") {
220                $(el).carousel("pause");
221                pauseIcon.hide();
222                playIcon.show();
223                $(this).attr("aria-label", "Reprendre l'animation");
224                $(this).attr("title", "Reprendre l'animation");
225            } else {
226                $(el).carousel("cycle");
227                playIcon.hide();
228
229                pauseIcon.show();
230                $(this).attr("aria-label", "Stopper l'animation");
231                $(this).attr("title", "Stopper l'animation");
232            }
233        });
234    });
235}

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.