chore: retira SimboloTresLineas y pasa los comentarios a inglés
SimboloTresLineas se quedó sin consumidores cuando SecuenciaClaridad ocupó sus dos sitios (hero y FraseAncla). Sólo lo usaba su propio test. La geometría del ≡ ya vive en lib/simbolo.ts, así que no se pierde nada. Los cinco comentarios de código que quedaban en español pasan a inglés, como pide CLAUDE.md. Los créditos de foto se quedan en español: son atribución, y el footer que los recoge está en español. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3c2185e200
commit
20a41c6d1a
8 files changed
+15
-79
No files matched your search
@@ -1,42 +0,0 @@
|
||||
'use client';
|
||||
|
||||
import { motion } from 'framer-motion';
|
||||
import { useEnVista } from '@/lib/motion';
|
||||
import { BARRAS_SIMBOLO } from '@/lib/simbolo';
|
||||
|
||||
// The manual's own description of the ≡ symbol, made literal: "las líneas van
|
||||
// de muchas/desordenadas (complejidad) a pocas/alineadas (claridad)". Five
|
||||
// uneven bars resolve, once in view, into the three clean aligned bars of the
|
||||
// official icon (see app/icon.svg) — decorative, one-shot, never loops.
|
||||
const FINAL = BARRAS_SIMBOLO;
|
||||
|
||||
const BARS = [
|
||||
{ from: { x: 6, y: 9, width: 22, height: 6, opacity: 0.9 }, to: FINAL[0] },
|
||||
{ from: { x: 36, y: 15, width: 16, height: 5, opacity: 0.45 }, to: { x: 44, y: 17, width: 8, height: 5, opacity: 0 } },
|
||||
{ from: { x: 16, y: 25, width: 30, height: 7, opacity: 0.9 }, to: FINAL[1] },
|
||||
{ from: { x: 8, y: 37, width: 14, height: 5, opacity: 0.45 }, to: { x: 12, y: 39, width: 8, height: 5, opacity: 0 } },
|
||||
{ from: { x: 20, y: 45, width: 26, height: 6, opacity: 0.9 }, to: FINAL[2] },
|
||||
];
|
||||
|
||||
export function SimboloTresLineas({ className = '' }: { className?: string }) {
|
||||
const { ref, enVista, reduced } = useEnVista();
|
||||
|
||||
return (
|
||||
<svg ref={ref} viewBox="0 0 64 64" className={className} aria-hidden="true" focusable="false">
|
||||
{BARS.map((bar, i) =>
|
||||
reduced ? (
|
||||
<rect key={i} {...bar.to} opacity={i === 1 || i === 3 ? 0 : 1} rx={1.5} fill="currentColor" />
|
||||
) : (
|
||||
<motion.rect
|
||||
key={i}
|
||||
rx={1.5}
|
||||
fill="currentColor"
|
||||
initial={bar.from}
|
||||
animate={enVista ? bar.to : bar.from}
|
||||
transition={{ duration: 0.7, delay: i * 0.08, ease: [0.22, 1, 0.36, 1] }}
|
||||
/>
|
||||
),
|
||||
)}
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { SimboloTresLineas } from '../SimboloTresLineas';
|
||||
|
||||
describe('<SimboloTresLineas />', () => {
|
||||
it('is decorative: hidden from assistive tech', () => {
|
||||
const { container } = render(<SimboloTresLineas />);
|
||||
expect(container.querySelector('svg')).toHaveAttribute('aria-hidden', 'true');
|
||||
});
|
||||
|
||||
it('renders five bars resolving toward the three-line symbol', () => {
|
||||
const { container } = render(<SimboloTresLineas />);
|
||||
expect(container.querySelectorAll('rect')).toHaveLength(5);
|
||||
});
|
||||
|
||||
it('takes its colour from currentColor, like the other brand graphics', () => {
|
||||
const { container } = render(<SimboloTresLineas />);
|
||||
container.querySelectorAll('rect').forEach((rect) => {
|
||||
expect(rect).toHaveAttribute('fill', 'currentColor');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user