From be42c2b4807ab1748dee1d67e6ce1d067361864e Mon Sep 17 00:00:00 2001 From: Alaguraj0361 Date: Tue, 14 Jul 2026 15:53:20 +0530 Subject: [PATCH] feat: align and scale our story section with interior_royal image --- src/components/RestaurantStory.tsx | 389 ++++++++++------------------- 1 file changed, 133 insertions(+), 256 deletions(-) diff --git a/src/components/RestaurantStory.tsx b/src/components/RestaurantStory.tsx index 40f7b5d..47ccf4a 100644 --- a/src/components/RestaurantStory.tsx +++ b/src/components/RestaurantStory.tsx @@ -1,135 +1,156 @@ "use client"; -import { useRef } from "react"; -import { motion, useScroll, useTransform } from "framer-motion"; import Image from "next/image"; export default function RestaurantStory() { - const sectionRef = useRef(null); - - // High-performance scroll tracking bound to the section's pinning viewport - const { scrollYProgress } = useScroll({ - target: sectionRef, - offset: ["start start", "end end"], - }); - - // Slide 1 (1928) - Active from progress 0.0 to 0.33 - const imgOpacity1 = useTransform(scrollYProgress, [0, 0.25, 0.33, 0.40], [1, 1, 0, 0]); - const imgScale1 = useTransform(scrollYProgress, [0, 0.33], [1.0, 1.08]); - const textOpacity1 = useTransform(scrollYProgress, [0, 0.25, 0.33], [1, 1, 0]); - const textY1 = useTransform(scrollYProgress, [0, 0.25, 0.33], [0, 0, -40]); - const bgYearOpacity1 = useTransform(scrollYProgress, [0, 0.25, 0.33], [0.12, 0.12, 0]); - const bgYearY1 = useTransform(scrollYProgress, [0, 0.33], [0, -80]); - - // Slide 2 (1972) - Active from progress 0.33 to 0.66 - const imgOpacity2 = useTransform(scrollYProgress, [0.25, 0.33, 0.58, 0.66], [0, 1, 1, 0]); - const imgScale2 = useTransform(scrollYProgress, [0.25, 0.33, 0.66], [0.95, 1.0, 1.08]); - const textOpacity2 = useTransform(scrollYProgress, [0.25, 0.33, 0.58, 0.66], [0, 1, 1, 0]); - const textY2 = useTransform(scrollYProgress, [0.25, 0.33, 0.58, 0.66], [40, 0, 0, -40]); - const bgYearOpacity2 = useTransform(scrollYProgress, [0.25, 0.33, 0.58, 0.66], [0, 0.12, 0.12, 0]); - const bgYearY2 = useTransform(scrollYProgress, [0.25, 0.66], [80, -80]); - - // Slide 3 (2026) - Active from progress 0.66 to 1.0 - const imgOpacity3 = useTransform(scrollYProgress, [0.58, 0.66, 0.90], [0, 1, 1]); - const imgScale3 = useTransform(scrollYProgress, [0.58, 0.66, 1.0], [0.95, 1.0, 1.08]); - const textOpacity3 = useTransform(scrollYProgress, [0.58, 0.66, 0.90], [0, 1, 1]); - const textY3 = useTransform(scrollYProgress, [0.58, 0.66, 1.0], [40, 0, 0]); - const bgYearOpacity3 = useTransform(scrollYProgress, [0.58, 0.66, 0.90], [0, 0.12, 0.12]); - const bgYearY3 = useTransform(scrollYProgress, [0.58, 1.0], [80, 0]); - - const timelineEvents = [ - { - year: "1928", - title: "The Palace Foundation", - text: "Our journey began in a grand Chettinad palace. Built with Burmese teak and Italian marble, the mansion served as a sanctuary of hospitality, welcoming royal emissaries and regional chieftains with legendary feasts.", - tag: "Circa 1928", - }, - { - year: "1972", - title: "Preserving Ancient Spices", - text: "The royal recipes were transcribed from palm leaves. Master spice-blenders preserved the art of hand-pounding cardamoms, cinnamon, and red sun-dried chilies in stone mortars, ensuring the flavors remained pristine.", - tag: "Circa 1972", - }, - { - year: "2026", - title: "The Modern Legacy Sanctuary", - text: "Today, My Dosa Place brings this heritage into the modern era. We unite century-old cooking methodologies with contemporary culinary presentation, inviting you to dine like royalty in Waterloo.", - tag: "Royal Dining", - }, - ]; - return ( -
+
{/* Traditional Temple Borders */}
- {/* Sticky Pinned Container */} -
+
- {/* Left Side: Gopuram Arched Frame Visual Court */} -
+ {/* Left Side: Story & Features Details (Fully Center-Aligned) */} +
- {/* Subtle Outer Temple Halo */} -
- - {/* Golden Corner Trim Background Shield */} -
-
+ {/* Badge Pre-title with Gold Crest */} +
+ {/* Gold Lamp/Lotus Crest */} + + + + + + + ••••• OUR STORY ••••• +
- {/* Main Gopuram Image Stack Frame */} + {/* Main Headline */} +

+ A Tradition Served
with Love +

+ + {/* Traditional Gold Divider */} +
+
+
+
+
+ + {/* Paragraph Narrative */} +

+ At My Dosa Place, food is more than just a meal, it's a tradition passed down through generations. From authentic recipes to warm hospitality, we bring the true essence of South India to your table. +

+ + {/* Traditional Bottom Gold Divider */} +
+
+
+
+
+ + {/* Grid of 4 Key Features */} +
+ + {/* Feature 1: Veg */} +
+
+ + + + +
+

+ 100% Pure Veg +

+

+ Pure vegetarian food made with the finest ingredients. +

+
+ + {/* Feature 2: Recipes */} +
+
+ + + + + + + +
+

+ Authentic Recipes +

+

+ Traditional recipes crafted with authentic South Indian flavors. +

+
+ + {/* Feature 3: Hospitality */} +
+
+ + + + + +
+

+ Warm Hospitality +

+

+ A homely environment with friendly service and a smile. +

+
+ + {/* Feature 4: Love */} +
+
+ + + +
+

+ Made With Love +

+

+ Every dish is prepared with love, care and traditional values. +

+
+ +
+ +
+ + {/* Right Side: Larger Gopuram Arched Frame Counter Image */} +
+ + {/* Ambient Glow */} +
+ + {/* Shield frame backing shadow */} +
+ + {/* Gopuram Arch Masked Image Wrapper */}
- {/* Image 1: 1928 Mansion */} - +
Chettinad Palace Mansion - - - {/* Image 2: 1972 Spice Altar */} - - South Indian Traditional Welcome - - - {/* Image 3: 2026 Thali Feast */} - - Royal Feast Banquet - +
{/* Inset Double Border Stroke Overlay */}
- {/* Active Era Tag Frame (Bottom Overlay) */} -
- {/* Tag 1 */} - - {timelineEvents[0].tag} - - {/* Tag 2 */} - - {timelineEvents[1].tag} - - {/* Tag 3 */} - - {timelineEvents[2].tag} - -
- -
- - {/* Right Side: Narrative Parallax Slides */} -
- - {/* Giant Outline Parallax Background Years */} -
- - 1928 - - - 1972 - - - 2026 - -
- - {/* Section Header */} -
- - O U R C H R O N I C L E S - -

- DOSA CHRONICLES -

-
-
- - {/* Interactive Slides Container */} -
- - {/* Slide 1 */} - -
- - {timelineEvents[0].year} - - -

- {timelineEvents[0].title} -

-
-

- {timelineEvents[0].text} -

-
- - {/* Slide 2 */} - -
- - {timelineEvents[1].year} - - -

- {timelineEvents[1].title} -

-
-

- {timelineEvents[1].text} -

-
- - {/* Slide 3 */} - -
- - {timelineEvents[2].year} - - -

- {timelineEvents[2].title} -

-
-

- {timelineEvents[2].text} -

-
- -
- - {/* Royal Seal Watermark */} -
-
- DR -
-
- + {/* Arch Caption Label Overlay */} +
+
Heritage Sanctuary - +