feat: Cómo empezar section (07) — 3-step on-ramp to WhatsApp
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
d8921bc0bc
commit
7d27c91cf7
4 files changed
+68
No files matched your search
@@ -5,6 +5,7 @@ import { ParaQuien } from '@/components/sections/ParaQuien';
|
|||||||
import { Mecanismo } from '@/components/sections/Mecanismo';
|
import { Mecanismo } from '@/components/sections/Mecanismo';
|
||||||
import { Disciplinas } from '@/components/sections/Disciplinas';
|
import { Disciplinas } from '@/components/sections/Disciplinas';
|
||||||
import { Estratega } from '@/components/sections/Estratega';
|
import { Estratega } from '@/components/sections/Estratega';
|
||||||
|
import { ComoEmpezar } from '@/components/sections/ComoEmpezar';
|
||||||
import { Cierre } from '@/components/sections/Cierre';
|
import { Cierre } from '@/components/sections/Cierre';
|
||||||
|
|
||||||
const jsonLd = {
|
const jsonLd = {
|
||||||
@@ -27,6 +28,7 @@ export default function Home() {
|
|||||||
<Mecanismo />
|
<Mecanismo />
|
||||||
<Disciplinas />
|
<Disciplinas />
|
||||||
<Estratega />
|
<Estratega />
|
||||||
|
<ComoEmpezar />
|
||||||
<Cierre />
|
<Cierre />
|
||||||
</main>
|
</main>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { motion } from 'framer-motion';
|
||||||
|
import { Container } from '@/components/primitives/Container';
|
||||||
|
import { CTA } from '@/components/primitives/CTA';
|
||||||
|
import { comoEmpezar, cierre } from '@/lib/content';
|
||||||
|
import { fadeInUp, staggerContainer, viewportOnce, usePrefersReducedMotion, motionProps } from '@/lib/motion';
|
||||||
|
|
||||||
|
export function ComoEmpezar() {
|
||||||
|
const reduced = usePrefersReducedMotion();
|
||||||
|
const waHref = `${cierre.contact.whatsapp.href}?text=${encodeURIComponent(comoEmpezar.whatsappText)}`;
|
||||||
|
return (
|
||||||
|
<section className="bg-base">
|
||||||
|
<Container className="py-24 md:py-32">
|
||||||
|
<motion.p variants={fadeInUp} initial="hidden" whileInView="visible" viewport={viewportOnce} {...motionProps(reduced)}
|
||||||
|
className="text-xs tracking-[0.3em] uppercase font-semibold text-gold">{comoEmpezar.eyebrow}</motion.p>
|
||||||
|
<motion.h2 variants={fadeInUp} initial="hidden" whileInView="visible" viewport={viewportOnce} {...motionProps(reduced)}
|
||||||
|
className="mt-4 font-serif italic font-bold text-3xl md:text-5xl text-ink">{comoEmpezar.title}</motion.h2>
|
||||||
|
<motion.ol variants={staggerContainer} initial="hidden" whileInView="visible" viewport={viewportOnce} {...motionProps(reduced)}
|
||||||
|
className="mt-12 grid gap-10 md:grid-cols-3">
|
||||||
|
{comoEmpezar.steps.map((step) => (
|
||||||
|
<motion.li key={step.n} variants={fadeInUp} className="border-t border-gold/30 pt-6">
|
||||||
|
<div className="font-serif italic font-black text-5xl md:text-6xl text-gold leading-none">{step.n}</div>
|
||||||
|
<h3 className="mt-4 font-sans font-bold text-xl text-ink">{step.name}</h3>
|
||||||
|
<p className="mt-3 text-muted leading-relaxed">{step.desc}</p>
|
||||||
|
</motion.li>
|
||||||
|
))}
|
||||||
|
</motion.ol>
|
||||||
|
<motion.div variants={fadeInUp} initial="hidden" whileInView="visible" viewport={viewportOnce} {...motionProps(reduced)}
|
||||||
|
className="mt-12">
|
||||||
|
<CTA href={waHref} label={comoEmpezar.cta} variant="light" />
|
||||||
|
</motion.div>
|
||||||
|
</Container>
|
||||||
|
</section>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import { render, screen } from '@testing-library/react';
|
||||||
|
import { describe, it, expect } from 'vitest';
|
||||||
|
import { ComoEmpezar } from '../ComoEmpezar';
|
||||||
|
|
||||||
|
describe('<ComoEmpezar />', () => {
|
||||||
|
it('renders the on-ramp steps', () => {
|
||||||
|
render(<ComoEmpezar />);
|
||||||
|
expect(screen.getByText('Escríbeme')).toBeInTheDocument();
|
||||||
|
expect(screen.getByText('Sesión de diagnóstico')).toBeInTheDocument();
|
||||||
|
});
|
||||||
|
it('links the CTA to WhatsApp with a prefilled message', () => {
|
||||||
|
render(<ComoEmpezar />);
|
||||||
|
const cta = screen.getByRole('link', { name: /Agenda tu sesión de diagnóstico/i });
|
||||||
|
const href = cta.getAttribute('href') ?? '';
|
||||||
|
expect(href).toMatch(/^https:\/\/wa\.me\//);
|
||||||
|
expect(href).toContain('text=');
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -63,6 +63,18 @@ export const estratega = {
|
|||||||
quote: 'El tiempo no se compra, se invierte.',
|
quote: 'El tiempo no se compra, se invierte.',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const comoEmpezar = {
|
||||||
|
eyebrow: 'cómo empezar',
|
||||||
|
title: 'Tu siguiente movimiento empieza con una conversación.',
|
||||||
|
steps: [
|
||||||
|
{ n: '01', name: 'Escríbeme', desc: 'Cuéntame dónde está tu negocio hoy.' },
|
||||||
|
{ n: '02', name: 'Sesión de diagnóstico', desc: 'Una conversación para ubicar tu punto de inflexión.' },
|
||||||
|
{ n: '03', name: 'Estrategia ejecutable', desc: 'Sales con claridad y tu siguiente movimiento definido.' },
|
||||||
|
],
|
||||||
|
cta: 'Agenda tu sesión de diagnóstico',
|
||||||
|
whatsappText: 'Hola, quiero agendar una sesión de diagnóstico',
|
||||||
|
};
|
||||||
|
|
||||||
export const cierre = {
|
export const cierre = {
|
||||||
quote: 'Devuélvele claridad al rumbo de tu empresa.',
|
quote: 'Devuélvele claridad al rumbo de tu empresa.',
|
||||||
cta: 'Define tu siguiente movimiento',
|
cta: 'Define tu siguiente movimiento',
|
||||||
|
|||||||
Reference in new issue
Block a user