Spaces:
Sleeping
Sleeping
Download components/RealWorld/RealWorldSection.tsx from Keep-Triangle/PratikWebsite: direct link, hf CLI and curl.
- Browser
- Download file 6.88 kB
-
https://huggingface.co/spaces/Keep-Triangle/PratikWebsite/resolve/main/components/RealWorld/RealWorldSection.tsx
- Command line
-
hf download hf://spaces/Keep-Triangle/PratikWebsite/components/RealWorld/RealWorldSection.tsx
-
curl -L -o RealWorldSection.tsx https://huggingface.co/spaces/Keep-Triangle/PratikWebsite/resolve/main/components/RealWorld/RealWorldSection.tsx
6.88 kB
| import React, { useRef } from 'react'; | |
| import { motion, useScroll, useTransform } from 'framer-motion'; | |
| import { Scale, Truck, Activity } from 'lucide-react'; | |
| const RealWorldSection: React.FC = () => { | |
| const containerRef = useRef<HTMLDivElement>(null); | |
| const { scrollYProgress } = useScroll({ | |
| target: containerRef, | |
| offset: ["start end", "end start"] | |
| }); | |
| // Gentle zoom-in effect mapped to scroll for a "breathing" image feel | |
| const scale = useTransform(scrollYProgress, [0, 1], [1, 1.15]); | |
| // Parallax opacity for text | |
| const textY = useTransform(scrollYProgress, [0.2, 0.8], [50, -50]); | |
| const opacity = useTransform(scrollYProgress, [0.2, 0.4, 0.8], [0, 1, 1]); | |
| return ( | |
| <section ref={containerRef} className="relative w-full h-[70vh] md:h-[85vh] overflow-hidden bg-transparent"> | |
| {/* Background Image - Cinematic Realism */} | |
| <motion.div | |
| className="absolute inset-0 z-0" | |
| style={{ scale }} | |
| > | |
| {/* | |
| Using a placeholder that closely matches the description: | |
| "Authentic indian red chilli wholesale environment, sacks, weighing scales" | |
| */} | |
| <img | |
| src="https://raw.githubusercontent.com/devarshiadi/CDN-Images/refs/heads/main/mirchicontext.png" | |
| alt="Wholesale Chilli Market" | |
| className="w-full h-full object-cover" | |
| /> | |
| {/* Warm Overlay to unify with brand colors */} | |
| <div className="absolute inset-0 bg-[#450a0a]/25 mix-blend-multiply" /> | |
| <div className="absolute inset-0 bg-gradient-to-t from-black/80 via-black/45 to-transparent" /> | |
| </motion.div> | |
| {/* Content Container */} | |
| <div className="relative z-10 w-full h-full flex flex-col justify-end pb-28 md:pb-32 px-6 md:px-12 lg:px-24 max-w-7xl mx-auto"> | |
| <div className="flex flex-col md:flex-row items-end justify-between gap-12 -translate-y-10 md:-translate-y-14 lg:-translate-y-16"> | |
| {/* Left: Manifesto / Text */} | |
| <motion.div | |
| style={{ y: textY, opacity }} | |
| className="max-w-2xl" | |
| > | |
| <div className="flex items-center gap-3 mb-6"> | |
| <div className="h-[2px] w-12 bg-brand-gold" /> | |
| <span className="text-brand-gold text-sm tracking-[0.2em] uppercase font-medium"> | |
| Wholesale Operations | |
| </span> | |
| </div> | |
| <h2 className="font-serif text-4xl md:text-5xl lg:text-6xl text-white mb-6 leading-tight"> | |
| The Heart of the Trade | |
| </h2> | |
| <p className="font-sans text-gray-200 text-lg md:text-xl font-light leading-relaxed drop-shadow-lg"> | |
| Operating at the intersection of tradition and scale. From the bustling yards of Byadgi to the premium wholesale markets of Maharashtra, we deliver the top-notch quality that defines your brand. | |
| </p> | |
| </motion.div> | |
| {/* Right: Floating Stats Card */} | |
| <motion.div | |
| initial={{ opacity: 0, x: 20 }} | |
| whileInView={{ opacity: 1, x: 0 }} | |
| transition={{ duration: 1, delay: 0.3 }} | |
| viewport={{ once: true }} | |
| className="w-full md:w-auto min-w-[300px]" | |
| > | |
| <div className="bg-[#0e0303] border border-white/15 p-8 rounded-xl shadow-[0_22px_60px_-45px_rgba(0,0,0,0.9)]"> | |
| <div className="flex items-center justify-between mb-8 pb-4 border-b border-white/10"> | |
| <span className="text-xs uppercase tracking-widest text-white/70">Live Metrics</span> | |
| <div className="flex items-center gap-2"> | |
| <span className="w-2 h-2 bg-green-500 rounded-full animate-pulse" /> | |
| <span className="text-[10px] text-green-400 font-mono">MARKET OPEN</span> | |
| </div> | |
| </div> | |
| <div className="space-y-6"> | |
| <div className="flex items-center gap-4"> | |
| <div className="p-3 bg-brand-red/20 rounded-lg text-brand-red"> | |
| <Truck className="w-5 h-5" /> | |
| </div> | |
| <div> | |
| <div className="text-2xl font-serif text-white">50+ Tons</div> | |
| <div className="text-xs text-gray-400 uppercase tracking-wide">Daily Dispatch</div> | |
| </div> | |
| </div> | |
| <div className="flex items-center gap-4"> | |
| <div className="p-3 bg-brand-gold/20 rounded-lg text-brand-gold"> | |
| <Scale className="w-5 h-5" /> | |
| </div> | |
| <div> | |
| <div className="text-2xl font-serif text-white">99.8%</div> | |
| <div className="text-xs text-gray-400 uppercase tracking-wide">Accuracy Rate</div> | |
| </div> | |
| </div> | |
| <div className="flex items-center gap-4"> | |
| <div className="p-3 bg-blue-500/20 rounded-lg text-blue-400"> | |
| <Activity className="w-5 h-5" /> | |
| </div> | |
| <div> | |
| <div className="text-2xl font-serif text-white">Serving</div> | |
| <div className="text-xs text-gray-400 uppercase tracking-wide">Maharashtra & Karnataka</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </motion.div> | |
| </div> | |
| </div> | |
| </section> | |
| ); | |
| }; | |
| export default RealWorldSection; |