Fix dropdownNav/Swiper
This commit is contained in:
parent
49eebe8232
commit
2f40c2a4f8
2 changed files with 7 additions and 27 deletions
1
resources/js/front.js
vendored
1
resources/js/front.js
vendored
|
|
@ -1,3 +1,4 @@
|
|||
require('./bootstrap')
|
||||
window.Swiper = require('swiper').default
|
||||
require('./vendor/navResponsive')
|
||||
require('./vendor/dropdown')
|
||||
33
resources/js/vendor/navResponsive.js
vendored
33
resources/js/vendor/navResponsive.js
vendored
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
})
|
||||
Loading…
Add table
Reference in a new issue