diff --git a/components/primitives/MarcoRetrato.tsx b/components/primitives/MarcoRetrato.tsx new file mode 100644 index 0000000..0fa59d7 --- /dev/null +++ b/components/primitives/MarcoRetrato.tsx @@ -0,0 +1,52 @@ +'use client'; + +import type { ReactNode } from 'react'; +import { motion } from 'framer-motion'; +import { usePrefersReducedMotion } from '@/lib/motion'; + +// Line-art frame for the strategist's portrait. Built so it reads as +// deliberate with today's placeholder inside and accepts the real photograph +// when it arrives without any rework: the frame never assumes what it wraps. +// +// The gold arc traces roughly three quarters of the circle and draws itself in +// — an open frame, not a closed badge. +export function MarcoRetrato({ children, className = '' }: { children: ReactNode; className?: string }) { + const reduced = usePrefersReducedMotion(); + + return ( +
+ +
{children}
+
+ ); +} diff --git a/components/primitives/__tests__/MarcoRetrato.test.tsx b/components/primitives/__tests__/MarcoRetrato.test.tsx new file mode 100644 index 0000000..78181bd --- /dev/null +++ b/components/primitives/__tests__/MarcoRetrato.test.tsx @@ -0,0 +1,20 @@ +import { render, screen } from '@testing-library/react'; +import { describe, it, expect } from 'vitest'; +import { MarcoRetrato } from '../MarcoRetrato'; + +describe('', () => { + it('renders whatever portrait it is given', () => { + render(retrato); + expect(screen.getByText('retrato')).toBeInTheDocument(); + }); + + it('keeps the frame decorative: the portrait carries the meaning', () => { + const { container } = render(retrato); + expect(container.querySelector('svg')).toHaveAttribute('aria-hidden', 'true'); + }); + + it('draws the arc that will survive the real photograph landing', () => { + const { container } = render(retrato); + expect(container.querySelectorAll('circle').length).toBeGreaterThanOrEqual(1); + }); +}); diff --git a/components/sections/Estratega.tsx b/components/sections/Estratega.tsx index ac3529b..0901871 100644 --- a/components/sections/Estratega.tsx +++ b/components/sections/Estratega.tsx @@ -4,6 +4,7 @@ import { Container } from '@/components/primitives/Container'; import { PatronPuntos } from '@/components/primitives/PatronPuntos'; import { Wordmark } from '@/components/primitives/Wordmark'; import { ContadorNumero } from '@/components/primitives/ContadorNumero'; +import { MarcoRetrato } from '@/components/primitives/MarcoRetrato'; import { estratega } from '@/lib/content'; import { fadeInUp, staggerContainer, viewportOnce, usePrefersReducedMotion, motionProps } from '@/lib/motion'; @@ -14,15 +15,15 @@ export function Estratega() { - {/* TODO dueña: real portrait. Until then, a branded placeholder built - from the manual's dot pattern rather than a stand-in stock photo. */} - - - + {/* TODO dueña: real portrait. The frame is built to take it as-is — + drop an in place of the placeholder below. */} + + +
+ + +
+