fix(lint): fix lint
This commit is contained in:
parent
20ec5e90b1
commit
a2b5e9684c
@ -93,11 +93,11 @@ export default function Team() {
|
||||
</div>
|
||||
</div>
|
||||
<div className="owl-buttons">
|
||||
<div className="owl-prev snbp1 owl-prev-testimonial-1" role="button" tabIndex="0">
|
||||
<div className="owl-prev snbp1 owl-prev-testimonial-1" role="button" tabIndex={0}>
|
||||
<span className="visually-hidden">Previous Slide</span>
|
||||
<i className="mi-arrow-left" aria-hidden="true"></i>
|
||||
</div>
|
||||
<div className="owl-next snbn1" role="button" tabIndex="0">
|
||||
<div className="owl-next snbn1" role="button" tabIndex={0}>
|
||||
<span className="visually-hidden">Next Slide</span>
|
||||
<i className="mi-arrow-right" aria-hidden="true"></i>
|
||||
</div>
|
||||
|
@ -1,29 +1,20 @@
|
||||
const addScrollspy = (
|
||||
defalutClass = "",
|
||||
linksContainer = ".scrollspy-link",
|
||||
activeClass = "active"
|
||||
) => {
|
||||
var section = document.querySelectorAll(".scrollSpysection");
|
||||
const addScrollspy = (defalutClass = "", linksContainer = ".scrollspy-link", activeClass = "active") => {
|
||||
const section = document.querySelectorAll(".scrollSpysection");
|
||||
|
||||
var sections = {};
|
||||
var i = 0;
|
||||
const sections = {};
|
||||
const i = 0;
|
||||
|
||||
Array.prototype.forEach.call(section, function (e) {
|
||||
// @ts-ignore
|
||||
sections[e.id] = e.offsetTop;
|
||||
});
|
||||
var scrollPosition =
|
||||
document.documentElement.scrollTop || document.body.scrollTop;
|
||||
const scrollPosition = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
|
||||
for (let i in sections) {
|
||||
for (const i in sections) {
|
||||
// @ts-ignore
|
||||
if (sections[i] <= scrollPosition) {
|
||||
document
|
||||
.querySelector(linksContainer + ` .${activeClass}`)
|
||||
?.setAttribute("class", defalutClass);
|
||||
const navLink = document.querySelector(
|
||||
linksContainer + " a[href*=" + i + "]"
|
||||
);
|
||||
document.querySelector(linksContainer + ` .${activeClass}`)?.setAttribute("class", defalutClass);
|
||||
const navLink = document.querySelector(linksContainer + " a[href*=" + i + "]");
|
||||
|
||||
navLink?.setAttribute("class", `${defalutClass} ${activeClass}`);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
export const headerChangeOnScroll = () => {
|
||||
var mainNav = document.querySelector(".main-nav");
|
||||
var navLogoWrapLogo = document.querySelector(".nav-logo-wrap .logo");
|
||||
var lightAfterScroll = document.querySelector(".light-after-scroll");
|
||||
const mainNav = document.querySelector(".main-nav");
|
||||
const navLogoWrapLogo = document.querySelector(".nav-logo-wrap .logo");
|
||||
const lightAfterScroll = document.querySelector(".light-after-scroll");
|
||||
if (window.scrollY > 0) {
|
||||
mainNav?.classList.remove("transparent");
|
||||
mainNav?.classList.add("small-height", "body-scrolled");
|
||||
|
@ -7,11 +7,9 @@ export function init_wow() {
|
||||
setTimeout(() => {
|
||||
/* Wow init */
|
||||
if (document.body.classList.contains("appear-animate")) {
|
||||
document
|
||||
.querySelectorAll(".wow")
|
||||
.forEach((el) => el.classList.add("no-animate"));
|
||||
document.querySelectorAll(".wow").forEach((el) => el.classList.add("no-animate"));
|
||||
}
|
||||
var wow = new WOW({
|
||||
const wow = new WOW({
|
||||
boxClass: "wow",
|
||||
animateClass: "animatedfgfg",
|
||||
offset: 100,
|
||||
@ -23,17 +21,13 @@ export function init_wow() {
|
||||
if (document.body.classList.contains("appear-animate")) {
|
||||
wow.init();
|
||||
} else {
|
||||
document
|
||||
.querySelectorAll(".wow")
|
||||
.forEach((el) => (el.style.opacity = "1"));
|
||||
document.querySelectorAll(".wow").forEach((el) => (el.style.opacity = "1"));
|
||||
}
|
||||
/* Wow for portfolio init */
|
||||
if (document.body.classList.contains("appear-animate")) {
|
||||
document
|
||||
.querySelectorAll(".wow-p")
|
||||
.forEach((el) => el.classList.add("no-animate"));
|
||||
document.querySelectorAll(".wow-p").forEach((el) => el.classList.add("no-animate"));
|
||||
}
|
||||
var wow_p = new WOW({
|
||||
const wow_p = new WOW({
|
||||
boxClass: "wow-p",
|
||||
animateClass: "animatedfgfg",
|
||||
offset: 100,
|
||||
@ -45,9 +39,7 @@ export function init_wow() {
|
||||
if (document.body.classList.contains("appear-animate")) {
|
||||
wow_p.init();
|
||||
} else {
|
||||
document
|
||||
.querySelectorAll(".wow-p")
|
||||
.forEach((el) => (el.style.opacity = "1"));
|
||||
document.querySelectorAll(".wow-p").forEach((el) => (el.style.opacity = "1"));
|
||||
}
|
||||
/* Wow for menu bar init */
|
||||
if (
|
||||
@ -62,9 +54,7 @@ export function init_wow() {
|
||||
}, 1500);
|
||||
});
|
||||
} else {
|
||||
document
|
||||
.querySelectorAll(".wow-menubar")
|
||||
.forEach((el) => (el.style.opacity = "1"));
|
||||
document.querySelectorAll(".wow-menubar").forEach((el) => (el.style.opacity = "1"));
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
@ -1,17 +1,14 @@
|
||||
// @ts-nocheck
|
||||
export function init_classic_menu_resize() {
|
||||
var mobile_nav = document.querySelector(".mobile-nav");
|
||||
var desktop_nav = document.querySelector(".desktop-nav");
|
||||
const mobile_nav = document.querySelector(".mobile-nav");
|
||||
const desktop_nav = document.querySelector(".desktop-nav");
|
||||
|
||||
mobile_nav.setAttribute("aria-expanded", "false");
|
||||
|
||||
// Mobile menu max height
|
||||
if (document.querySelector(".main-nav")) {
|
||||
document.querySelector(".desktop-nav > ul").style.maxHeight =
|
||||
window.innerHeight -
|
||||
document.querySelector(".main-nav").offsetHeight -
|
||||
20 +
|
||||
"px";
|
||||
window.innerHeight - document.querySelector(".main-nav").offsetHeight - 20 + "px";
|
||||
}
|
||||
|
||||
// Mobile menu style toggle
|
||||
|
@ -11,13 +11,11 @@ export const parallaxMouseMovement = () => {
|
||||
|
||||
this.querySelectorAll(".parallax-mousemove").forEach((el) => {
|
||||
const offset = parseInt(el.getAttribute("data-offset"));
|
||||
const translate = `translate3d(${Math.round(
|
||||
offsetX * offset
|
||||
)}px, ${Math.round(offsetY * offset)}px, 0px)`;
|
||||
const translate = `translate3d(${Math.round(offsetX * offset)}px, ${Math.round(offsetY * offset)}px, 0px)`;
|
||||
el.style.transform = translate;
|
||||
});
|
||||
|
||||
let sceneOffsetX = e.pageX - this.offsetLeft;
|
||||
const sceneOffsetX = e.pageX - this.offsetLeft;
|
||||
|
||||
this.querySelectorAll(".parallax-mousemove-follow").forEach((el) => {
|
||||
el.style.left = `${sceneOffsetX}px`;
|
||||
@ -58,10 +56,7 @@ export function parallaxScroll() {
|
||||
|
||||
function addScrollParallax() {
|
||||
document.querySelectorAll("[data-rellax-y]").forEach((element) => {
|
||||
if (
|
||||
element.getBoundingClientRect().top < window.innerHeight &&
|
||||
element.getBoundingClientRect().bottom > 0
|
||||
) {
|
||||
if (element.getBoundingClientRect().top < window.innerHeight && element.getBoundingClientRect().bottom > 0) {
|
||||
if (!element.classList.contains("js-in-viewport")) {
|
||||
element.classList.add("js-in-viewport");
|
||||
rellax_y.refresh();
|
||||
@ -87,10 +82,7 @@ export function parallaxScroll() {
|
||||
});
|
||||
function addParallaxX() {
|
||||
document.querySelectorAll("[data-rellax-x]").forEach((element) => {
|
||||
if (
|
||||
element.getBoundingClientRect().top < window.innerHeight &&
|
||||
element.getBoundingClientRect().bottom > 0
|
||||
) {
|
||||
if (element.getBoundingClientRect().top < window.innerHeight && element.getBoundingClientRect().bottom > 0) {
|
||||
if (!element.classList.contains("js-in-viewport")) {
|
||||
element.classList.add("js-in-viewport");
|
||||
rellax_x.refresh();
|
||||
|
@ -1,7 +1,7 @@
|
||||
// @ts-nocheck
|
||||
export const toggleMobileMenu = () => {
|
||||
var mobile_nav = document.querySelector(".mobile-nav");
|
||||
var desktop_nav = document.querySelector(".desktop-nav");
|
||||
const mobile_nav = document.querySelector(".mobile-nav");
|
||||
const desktop_nav = document.querySelector(".desktop-nav");
|
||||
|
||||
if (desktop_nav.classList.contains("js-opened")) {
|
||||
desktop_nav.style.maxHeight = "0px";
|
||||
@ -14,8 +14,8 @@ export const toggleMobileMenu = () => {
|
||||
}
|
||||
};
|
||||
export const closeMobileMenu = () => {
|
||||
var mobile_nav = document.querySelector(".mobile-nav");
|
||||
var desktop_nav = document.querySelector(".desktop-nav");
|
||||
const mobile_nav = document.querySelector(".mobile-nav");
|
||||
const desktop_nav = document.querySelector(".desktop-nav");
|
||||
|
||||
if (desktop_nav.classList.contains("js-opened")) {
|
||||
desktop_nav.style.maxHeight = "0px";
|
||||
|
Loading…
x
Reference in New Issue
Block a user