Bob AI: Updated Stats section with dark background, animated count-u

This commit is contained in:
kudinDmitriyUp
2026-07-02 00:19:58 +00:00
parent 109d52b101
commit 8a6cf572f3

View File

@@ -1,41 +1,134 @@
// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this
// file as the canonical source for the "stats" section.
/* eslint-disable */
// @ts-nocheck — generated by catalog-eject; runtime-correct but TS strict-mode false-positives on inlined catalog body
import { cls } from "@/lib/utils";
import Button from "@/components/ui/Button";
import TextAnimation from "@/components/ui/TextAnimation";
import ImageOrVideo from "@/components/ui/ImageOrVideo";
import ScrollReveal from "@/components/ui/ScrollReveal";
import { useEffect, useRef } from "react";
import { motion, useInView, animate } from "motion/react";
import React from 'react';
import MetricsMediaCards from '@/components/sections/metrics/MetricsMediaCards';
import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary";
const metrics = [
{
value: "+50",
title: "Businesses",
description: "Active digital presence.",
imageSrc: "http://img.b2bpic.net/free-photo/3d-geometric-abstract-background_1048-11112.jpg"
},
{
value: "7",
title: "Days",
description: "Guaranteed delivery time.",
imageSrc: "http://img.b2bpic.net/free-vector/ring-glowing-points-black_1217-1373.jpg"
},
{
value: "100%",
title: "Satisfaction",
description: "Or you don't pay.",
imageSrc: "http://img.b2bpic.net/free-photo/closeup-shot-glass-marbles_53876-47208.jpg"
}
];
type Metric = {
value: string;
title: string;
description: string;
} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never });
function AnimatedStat({ value, prefix = "", suffix = "", label1, label2, delay = 0 }: { value: number, prefix?: string, suffix?: string, label1: string, label2: string, delay?: number }) {
const nodeRef = useRef(null as any);
const inView = useInView(nodeRef, { once: true, margin: "-50px" });
useEffect(() => {
if (inView && nodeRef.current) {
const controls = animate(0, value, {
duration: 2,
delay: delay,
ease: "easeOut",
onUpdate(val) {
if (nodeRef.current) {
nodeRef.current.textContent = `${prefix}${Math.round(val)}${suffix}`;
}
}
});
return () => controls.stop();
}
}, [inView, value, prefix, suffix, delay]);
export default function StatsSection(): React.JSX.Element {
return (
<div id="stats" data-section="stats">
<SectionErrorBoundary name="stats">
<MetricsMediaCards
tag="TRUST"
title="PROVEN TRACK RECORD"
description="Results that drive business growth."
metrics={[
{
value: "+50",
title: "Businesses",
description: "Active digital presence.",
imageSrc: "http://img.b2bpic.net/free-photo/3d-geometric-abstract-background_1048-11112.jpg",
},
{
value: "7",
title: "Days",
description: "Guaranteed delivery time.",
imageSrc: "http://img.b2bpic.net/free-vector/ring-glowing-points-black_1217-1373.jpg",
},
{
value: "100%",
title: "Satisfaction",
description: "Or you don't pay.",
imageSrc: "http://img.b2bpic.net/free-photo/closeup-shot-glass-marbles_53876-47208.jpg",
},
]}
textAnimation="slide-up"
/>
</SectionErrorBoundary>
<div className="flex flex-col items-center text-center px-4">
<div className="font-tight font-black text-[88px] leading-none text-white">
<span ref={nodeRef}>{prefix}0{suffix}</span>
</div>
<div className="mt-2 flex flex-col gap-0">
<span className="font-tight font-bold text-[18px] text-[#7D1C2E]">{label1}</span>
<span className="font-sans font-normal text-[14px] text-[#555555]">{label2}</span>
</div>
</div>
);
}
const StatsInline = () => (
<section aria-label="Metrics section" className="py-24 md:py-32 bg-[#1A1A1A] relative overflow-hidden">
<div className="w-content-width mx-auto">
{/* Stats Grid */}
<div className="grid grid-cols-1 md:grid-cols-3 gap-12 md:gap-0">
<div className="md:border-r-[0.5px] md:border-white/20 py-4">
<AnimatedStat
value={50}
prefix="+"
label1="Active"
label2="businesses"
delay={0}
/>
</div>
<div className="md:border-r-[0.5px] md:border-white/20 py-4">
<AnimatedStat
value={7}
suffix=" DAYS"
label1="Guaranteed"
label2="delivery"
delay={0.2}
/>
</div>
<div className="py-4">
<AnimatedStat
value={100}
suffix="%"
label1="Satisfaction"
label2="or you don't pay"
delay={0.4}
/>
</div>
</div>
{/* Guarantee Quote */}
<motion.div
initial={{ opacity: 0, y: 40 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, margin: "-100px" }}
transition={{ duration: 0.8, ease: "easeOut", delay: 0.6 }}
className="mt-24 md:mt-32 flex justify-center"
>
<div className="border-l-[4px] border-[#7D1C2E] pl-6 py-2 max-w-3xl">
<p className="font-tight font-bold italic text-[36px] text-white/70 leading-[1.1]">
"If we don't deliver in 7 days,<br className="hidden md:block" /> you don't pay. Period."
</p>
<p className="mt-4 font-sans text-[14px] text-[#555555]">
Apex Web Group
</p>
</div>
</motion.div>
</div>
</section>
);
export default function StatsSection() {
return (
<div data-webild-section="stats" id="stats">
<StatsInline />
</div>
);
}