change content

This commit is contained in:
HAM!DREZA
2024-07-20 18:17:31 +03:30
parent ba0c128832
commit dec2788106
25 changed files with 1191 additions and 959 deletions
+56 -57
View File
@@ -13,12 +13,11 @@
<p
class="text-[3.59vw] md:text-[1.186vw] mt-[5vw] md:mt-[0.8vw] w-full md:w-[75%]"
>
ما در فروشگاه جوانه سعی بر آن داریم تا سبدی از بهترین محصولات سالم و
طبیعی و ارگانیک ، رژیمی و بدون گلوتن را فراهم آوریم تا بتوانیم تجربه
خریدی سالم و اطمینان بخشی را برای شما محیا کنیم.
در جشنواره روز ملی نان که توسط دانشگاه علوم پزشکی برگزار شد، این مجموعه توسط امام جمعه و استاندار
محترم و رئیس اداره غله به عنوان برگزیده این جشنواره معرفی و موفق به کسب تندیس برتر این جشنواره گردید.
</p>
<div id="textCard"
<!-- <div id="textCard"
class="text-card flex flex-col flex-col-reverse md:flex-row mt-[2.8vw] w-full md:w-[27.396vw]"
>
<svg
@@ -46,7 +45,7 @@
</p>
</div>
</div>
</div>
</div> -->
</div>
<div id="cards" class="card h-[97.949vw] md:!h-[35.417vw] w-full md:w-[35.417vw]">
@@ -82,64 +81,64 @@ onMounted(() => {
document.getElementById("cards").classList.remove("card")
document.getElementById("textCard").classList.remove("text-card")
}
ctx = gsap.context((self) => {
const cards = gsap.utils.toArray(".card");
const texts = gsap.utils.toArray(".text-card");
gsap.set(cards, { height: 100});
gsap.set(texts, { xPercent: 0, yPercent: 100, autoAlpha: 1 });
// gsap.set(cards, { zIndex: (i, target, targets) => targets.length - i });
// ctx = gsap.context((self) => {
// const cards = gsap.utils.toArray(".card");
// const texts = gsap.utils.toArray(".text-card");
// gsap.set(cards, { height: 100});
// gsap.set(texts, { xPercent: 0, yPercent: 100, autoAlpha: 1 });
// // gsap.set(cards, { zIndex: (i, target, targets) => targets.length - i });
const tl = gsap.timeline({
defaults: {
duration: 1,
ease: "power1.inOut",
},
scrollTrigger: {
trigger: ".wrapper",
start: "top top",
end: "+=150%",
pin: ".wrapper",
scrub: true,
// const tl = gsap.timeline({
// defaults: {
// duration: 1,
// ease: "power1.inOut",
// },
// scrollTrigger: {
// trigger: ".wrapper",
// start: "top top",
// end: "+=150%",
// pin: ".wrapper",
// scrub: true,
},
});
texts.forEach((text, i) => {
tl.to(
text,
{
y: -window.innerHeight * 0.001,
yPercent: 0,
},
"<"
).to(text, {
autoAlpha: 0,
duration: 5,
});
});
// },
// });
// texts.forEach((text, i) => {
// tl.to(
// text,
// {
// y: -window.innerHeight * 0.001,
// yPercent: 0,
// },
// "<"
// ).to(text, {
// autoAlpha: 0,
// duration: 5,
// });
// });
const tl2 = gsap.timeline({
defaults: {
duration: 1,
ease: "power1.inOut",
},
scrollTrigger: {
trigger: ".wrapper",
start: "top top",
end: "+=150%",
scrub: true,
},
});
// const tl2 = gsap.timeline({
// defaults: {
// duration: 1,
// ease: "power1.inOut",
// },
// scrollTrigger: {
// trigger: ".wrapper",
// start: "top top",
// end: "+=150%",
// scrub: true,
// },
// });
cards.forEach((card, i) => {
tl2.to(card, {
height: 0,
autoAlpha: 0,
duration: 5,
});
});
// cards.forEach((card, i) => {
// tl2.to(card, {
// height: 0,
// autoAlpha: 0,
// duration: 5,
// });
// });
});
// });
});
</script>