Fix dropdownNav/Swiper

This commit is contained in:
ossan KASSEGNE 2021-06-08 19:10:57 +02:00
parent 49eebe8232
commit 2f40c2a4f8
2 changed files with 7 additions and 27 deletions

View file

@ -1,3 +1,4 @@
require('./bootstrap')
window.Swiper = require('swiper').default
require('./vendor/navResponsive')
require('./vendor/dropdown')

View file

@ -1,3 +1,7 @@
import Swiper, { Navigation } from 'swiper';
Swiper.use([Navigation]);
var mySwiper = new Swiper('.swiper-container', {
// Optional parameters
direction: 'horizontal',
@ -9,8 +13,6 @@ var mySwiper = new Swiper('.swiper-container', {
// If we need pagination
pagination: {
el: '.swiper-pagination',
type: 'bullets',
clickable: true
},
// Navigation arrows
@ -32,32 +34,9 @@ var mySwiper = new Swiper('.swiper-container', {
slidesPerView: 2,
spaceBetween: 30
},
768: {
100: {
slidesPerView: 1,
spaceBetween: 10
}
}
})
function dropContent() {
var x = document.getElementById("mainNav");
var y = document.getElementById("loginNav")
if (x.className === "navbar-links") {
x.className += " responsive";
y.className = "dropdown-content-mobile";
} else {
x.className = "navbar-links";
}
}
function dropLoginInfo() {
var x = document.getElementById("mainNav");
var y = document.getElementById("loginNav")
if (y.className === "dropdown-content-mobile") {
y.className += " resp";
x.className = "navbar-links";
} else {
y.className = "dropdown-content-mobile";
}
}
})