From 3db94db2a8c471b1bc000188141997078b04d9c0 Mon Sep 17 00:00:00 2001 From: EmmanuelRdezG2 Date: Sat, 20 Aug 2022 22:56:25 -0500 Subject: [PATCH 1/3] added index export file --- src/ts/index.ts | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/ts/index.ts diff --git a/src/ts/index.ts b/src/ts/index.ts new file mode 100644 index 0000000..0537b72 --- /dev/null +++ b/src/ts/index.ts @@ -0,0 +1,4 @@ +export * from './changeImage' +export * from './countEffect' +export * from './navLogic' +export * from './subtitleAnimationsInMobile' From bef0dd7dc53b0bf376e86a387a5c5be74a4aafb4 Mon Sep 17 00:00:00 2001 From: EmmanuelRdezG2 Date: Sat, 20 Aug 2022 22:56:59 -0500 Subject: [PATCH 2/3] imports optimized --- src/main.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main.ts b/src/main.ts index 06f87b4..d417710 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,17 +1,18 @@ import './scss/index.scss' -import { changeImage } from './ts/changeImage' -//import { countEffect } from './ts/countEffect' -import { mobileNav } from './ts/navLogic' -import { animationInMobile } from './ts/subtitleAnimationsInMobile' +import { changeImage, mobileNav, animationInMobile, countEffect } from './ts/index' +// TODO: +animationInMobile() +mobileNav() //countEffect() -changeImage(document.querySelector('.image1'), ['logo.png', 'image.png', 'image2.png']) -changeImage(document.querySelector('.image2'), [ +changeImage(document.querySelector('.image1'), [ + 'logo.png', + 'image.png', + 'image2.png', +]) +changeImage(document.querySelector('.image2'), [ 'image3.png', 'image4.png', 'taller1.png', 'image5.png', ]) - -mobileNav() -animationInMobile() From be6c5352888f6085cee4c0c6df691caec60c1eab Mon Sep 17 00:00:00 2001 From: EmmanuelRdezG2 Date: Sat, 20 Aug 2022 22:57:32 -0500 Subject: [PATCH 3/3] route images "fixed" --- src/ts/changeImage.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ts/changeImage.ts b/src/ts/changeImage.ts index 9372286..6c87ff3 100644 --- a/src/ts/changeImage.ts +++ b/src/ts/changeImage.ts @@ -12,7 +12,6 @@ export const changeImage = (element: any, images: string[]): void => { element.classList.remove('animation') }, 500) if (i >= images.length) i = 0 - element.src = `./src/assets/img/${images[i]}` - i += 1 + element.src = `../assets/img/${images[i]}` }, 5000) }