PageSourceSearch

https://lacompagniedesaidants.org/wp-content/themes/wordpress-startertheme-cda/js/singles/single-courses.js

js lacompagniedesaidants.org collected 2026-10-04 08:41:55 UTC 2,040 bytes, 84 lines download raw bytes

1import { BlockHero } from "../templates/parts/block-hero.js";
2import { VideoCover } from "../templates/parts/video-cover.js";
3
4
5if ($('body').hasClass('single-sfwd-courses')) {
6
7  //* INTRO
8  BlockHero();
9  VideoCover();
10
11  //* MEDIA VIDEOS CAROUSEL *//
12  var mediaSwiper = new Swiper(".myMediaSwiper", {
13    loop: true,
14    slidesPerView: 3,
15    spaceBetween: 40,
16    centeredSlides: true,
17    autoplay: {
18      delay: 3500,
19    },
20    navigation: {
21      nextEl: ".swiper-button-next",
22      prevEl: ".swiper-button-prev",
23    },
24    disableOnInteraction: true,
25    pauseOnMouseEnter: true,
26    breakpoints: {
27      // when window width is >= 320px
28      320: {
29        slidesPerView: 1,
30        spaceBetween: 20
31      },
32      // when window width is >= 480px
33      480: {
34        slidesPerView: 2,
35        spaceBetween: 30
36      },
37      // when window width is >= 640px
38      640: {
39        slidesPerView: 2,
40        spaceBetween: 40
41      },
42      960: {
43          slidesPerView: 3,
44          spaceBetween: 40
45        }
46    }
47  })
48
49  // stop carousel on hover
50  $(".myMediaSwiper").mouseenter(function () {
51    mediaSwiper.autoplay.stop();
52  });
53
54  // restart carousel 
55  $(".myMediaSwiper").mouseleave(function () {
56    mediaSwiper.autoplay.start();
57  });
58
59
60  $(".myMediaSwiper .swiper-slide").click(function () {
61    var target = $(this).attr('data-bs-target');
62    const id = target.split('#').pop();
63
64    // display modal
65    $('#' + id).modal('show');
66  });
67
68  //! RGAA
69  $('.myMediaSwiper .swiper-button-next').on('keydown', function (e) {
70    if (e.key === 'Enter') {
71      $('.myMediaSwiper .swiper-slide-active a').focus();
72    };
73  });
74  $('.myMediaSwiper .swiper-button-prev').on('keydown', function (e) {
75    if (e.key === 'Enter') {
76      $('.myMediaSwiper .swiper-slide-active a').focus();
77    };
78  });
79
80  if ($('#respond #submit').length > 0) {
81    $('#respond #submit').attr('aria-label', 'poster le commentaire');
82    $('#respond #submit').append('<span class="visually-hidden">poster le commentaire</span>');
83  };
84}

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.