feat: Hero section (01) with HV-1 hormozi + V-a editorial variants
This commit is contained in:
1 parent
d218b19655
commit
ccfcf71491
3 files changed
+70
-96
No files matched your search
@@ -0,0 +1,42 @@
|
||||
'use client';
|
||||
|
||||
import { motion } from 'framer-motion';
|
||||
import { Wordmark } from '@/components/primitives/Wordmark';
|
||||
import { CTA } from '@/components/primitives/CTA';
|
||||
import { Container } from '@/components/primitives/Container';
|
||||
import { hero } from '@/lib/content';
|
||||
import { easeOutExpo, fadeInUp, staggerContainer } from '@/lib/motion';
|
||||
|
||||
type Variant = 'hormozi' | 'editorial';
|
||||
|
||||
export function Hero({ variant = 'editorial' }: { variant?: Variant }) {
|
||||
const isHormozi = variant === 'hormozi';
|
||||
const headlineBase = isHormozi
|
||||
? 'font-sans font-black uppercase tracking-tight'
|
||||
: 'font-serif italic font-bold';
|
||||
const headlineSize = 'text-4xl md:text-6xl leading-[1.1]';
|
||||
|
||||
return (
|
||||
<section className="bg-bg-pure">
|
||||
<Container className="min-h-[88vh] flex flex-col items-center justify-center text-center py-24">
|
||||
<motion.div variants={staggerContainer} initial="hidden" animate="visible" className="flex flex-col items-center">
|
||||
<motion.div variants={fadeInUp}><Wordmark size="xl" /></motion.div>
|
||||
<motion.p variants={fadeInUp} className="mt-6 text-xs md:text-sm tracking-[0.3em] uppercase font-semibold text-gold">
|
||||
{hero.eyebrow}
|
||||
</motion.p>
|
||||
<motion.h1 variants={fadeInUp} className={`mt-8 ${headlineBase} ${headlineSize} text-ink`}>
|
||||
{hero.headline.line1}{' '}
|
||||
<span className="text-gold">{hero.headline.effort}</span>{' '}
|
||||
{hero.headline.line3}{' '}
|
||||
<span style={{ borderBottom: isHormozi ? '5px solid #B8901f' : '3px solid #B8901f', paddingBottom: 2 }}>
|
||||
{hero.headline.clarity}
|
||||
</span>
|
||||
</motion.h1>
|
||||
<motion.div variants={fadeInUp} className="mt-10">
|
||||
<CTA href="#contacto" label={hero.cta} variant="light" />
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
</Container>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { Hero } from '../Hero';
|
||||
|
||||
describe('<Hero />', () => {
|
||||
it('renders the eyebrow', () => {
|
||||
render(<Hero variant="editorial" />);
|
||||
expect(screen.getByText(/tu estratega de crecimiento/i)).toBeInTheDocument();
|
||||
});
|
||||
it('renders the headline copy', () => {
|
||||
render(<Hero variant="hormozi" />);
|
||||
expect(screen.getByText(/Tu negocio/i)).toBeInTheDocument();
|
||||
expect(screen.getByText(/más esfuerzo/i)).toBeInTheDocument();
|
||||
expect(screen.getByText(/más claridad/i)).toBeInTheDocument();
|
||||
});
|
||||
it('renders the CTA', () => {
|
||||
render(<Hero variant="editorial" />);
|
||||
expect(screen.getByRole('link', { name: /define tu siguiente movimiento/i })).toBeInTheDocument();
|
||||
});
|
||||
it('does NOT render scarcity (cupos/cohorte)', () => {
|
||||
const { container } = render(<Hero variant="editorial" />);
|
||||
expect(container.textContent).not.toMatch(/cupos|cohorte|generación fundadora/i);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user