Skip to content

Commit d21578d

Browse files
committed
make production better
1 parent 02a0324 commit d21578d

1 file changed

Lines changed: 26 additions & 64 deletions

File tree

components/sections/Production.tsx

Lines changed: 26 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,93 +2,55 @@
22
import gsap from "gsap";
33
import { useGSAP } from "@gsap/react";
44
import { ScrollSmoother, ScrollTrigger, SplitText } from "gsap/all";
5-
6-
import SimpleBtn from "../Button/SimpleBtn";
75
import Image from "next/image";
6+
import { Inter } from "next/font/google";
7+
8+
const InterFont = Inter({
9+
weight: "600",
10+
});
811

912
gsap.registerPlugin(ScrollTrigger, SplitText, ScrollSmoother);
1013

1114
export default function Production() {
1215
// const container = useRef(null);
1316

1417
useGSAP(() => {
15-
const SplitedText = new SplitText(".textTarget", {
16-
type: "chars, words",
18+
const SplitedText = new SplitText(".prodText", {
19+
type: "lines",
20+
mask:"lines",
1721
});
1822

1923
const productionTl = gsap.timeline({
2024
scrollTrigger: {
2125
trigger: ".prod-container",
22-
start: "top 70%",
23-
end: "+=2000",
24-
scrub: 5,
25-
// markers: true,
26-
},
27-
});
28-
productionTl.from(".prod-img", {
29-
yPercent: 500,
30-
stagger: {
31-
each: 1,
32-
from: "random",
26+
start: "top 80%",
27+
end: "bottom bottom",
28+
scrub : 3,
29+
markers: true,
3330
},
3431
});
35-
productionTl.from(SplitedText.chars, {
36-
duration: 3,
32+
33+
productionTl.from(SplitedText.lines, {
34+
duration:5,
35+
yPercent: 100,
3736
opacity: 0,
38-
scale: 0,
39-
y: 80,
40-
rotationX: 180,
41-
transformOrigin: "0% 50% -50",
42-
ease: "back",
43-
stagger: 0.05,
37+
stagger: 2,
38+
ease: "expo.inOut",
4439
});
4540
});
4641
return (
47-
<section className="prod-container relative w-full h-screen flex flex-col justify-around items-center overflow-hidden">
48-
<h2>How Bakery Should be Today</h2>
49-
<SimpleBtn title="About" />
50-
51-
{/* <div
52-
id="img-content"
53-
className="w-full flex flex-row justify-around items-center"
54-
> */}
55-
<Image
56-
className="prod-img absolute top-[10%] left-[10%]"
42+
<section className="prod-container relative w-full justify-around items-center overflow-hidden">
43+
<article className="pt-24 px-5 bg-pinky ">
44+
{/* <Image
45+
className="prod-img md:float-left rounded-2xl w-full"
5746
id="prod-img"
5847
src={"/img/mae-mu.jpg"}
5948
width={200}
6049
height={200}
6150
alt="bakery image"
62-
/>
63-
<Image
64-
className="prod-img absolute top-[-20%] left-[40%]"
65-
id="prod-img"
66-
src={"/img/DecorativeArtisanBreads.jpeg"}
67-
width={200}
68-
height={200}
69-
alt="bakery image"
70-
/>
71-
<Image
72-
className="prod-img absolute top-[-30%] left-[70%]"
73-
id="prod-img"
74-
src={"/img/heather-barnes.jpg"}
75-
width={200}
76-
height={200}
77-
alt="bakery image"
78-
/>
79-
{/* </div> */}
80-
</section>
51+
/> */}
52+
<p className={`${InterFont.className} text-cake prodText text-4xl/tight lg:text-9xl/tight pt-5 text-center`}>Pure Crust is a charming bakery shop that delights customers with its artisanal approach to baking. Nestled in a cozy corner of the neighborhood, it offers a wide array of freshly baked goods, from crusty sourdough loaves to delicate pastries and mouthwatering cakes. </p>
53+
</article>
54+
</section>
8155
);
8256
}
83-
84-
{
85-
/* <div>
86-
<h2 className="textTarget text-3xl text-cake">
87-
We believe good food brings people together.
88-
</h2>
89-
<h2>
90-
We use organic flour, local honey, and other natural ingredients
91-
</h2>
92-
<h2>That’s why we bake with heart and keep things eco-friendly</h2>
93-
</div> */
94-
}

0 commit comments

Comments
 (0)