You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
744 B

  1. import Swiper from 'swiper';
  2. new Swiper('.swiper-container', {
  3. // Optional parameters
  4. loop: true,
  5. autoplay: {
  6. delay: 5000,
  7. },
  8. // Navigation arrows
  9. navigation: {
  10. nextEl: '.swiper-button-next',
  11. prevEl: '.swiper-button-prev',
  12. },
  13. });
  14. document.addEventListener('DOMContentLoaded', () => {
  15. const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
  16. if ($navbarBurgers.length > 0) {
  17. $navbarBurgers.forEach((el) => {
  18. el.addEventListener('click', () => {
  19. const target = el.dataset.target;
  20. const $target = document.getElementById(target);
  21. el.classList.toggle('is-active');
  22. $target.classList.toggle('is-active');
  23. });
  24. });
  25. }
  26. });