Fixed animations

This commit is contained in:
Christian Anetzberger
2023-01-30 18:36:24 +01:00
parent 63bab028f7
commit d1b2652aaf
7 changed files with 44 additions and 26 deletions

View File

@@ -105,6 +105,13 @@ export default class Site extends App {
});
this.tl.clear();
if (document.querySelector(".landing-img")) {
this.tl.to(".landing-img", {
scale: 0.9,
opacity: 0,
});
}
if (document.querySelector(".mainheading")) {
this.tl.to(".mainheading", {
opacity: 0,
@@ -123,6 +130,30 @@ export default class Site extends App {
);
}
if (document.querySelector(".products-icon")) {
if (getWidth() > 1200) {
this.tl.to(
".products-icon",
{
opacity: 0,
duration: 0.1,
},
0
);
} else {
this.tl.to(
".products-icon",
{
opacity: 0,
height: 0,
minHeight: 0,
duration: 0.5,
},
0
);
}
}
if (document.querySelector(".products-img")) {
if (getWidth() > 1200) {
this.tl.to(
@@ -148,13 +179,6 @@ export default class Site extends App {
}
}
if (document.querySelector(".landing-img")) {
this.tl.to(".landing-img", {
scale: 0.9,
opacity: 0,
});
}
this.tl.to(node, {
opacity: 0,
duration: 0.1,