feat: rediseño «El documento» en curso, contacto real y enlaces externos
Primitivas y contenido del rediseño (escala tipográfica, Revelar, MarcaSeccion, Seccion, Antetitulo, SimboloMarca, Resplandor, ClaridadHero, sección Proceso de ocho etapas, lib/content.ts reestructurado en seis secciones con alias para las viejas). Mecanismo y FormaTrabajar se retiran. Encima, lo de esta sesión: - recorrido: creeer vuelve a responder cada situación en vez de repetirla (el alias apuntaba respuesta a situacion); respuestas en plural. Créditos de las seis fotos de México. - contacto: WhatsApp, email (con mailto:) y LinkedIn reales; iconos de las redes en el cierre y el footer (IconoRed, trazos de Simple Icons, CC0). - enlaces: lo externo abre en otra pestaña con noopener y aviso para lectores de pantalla (lib/enlaces.ts); mailto y anclas se quedan. - Proceso: las ocho tarjetas no aparecían nunca en móvil (amount 0.3 sobre una lista de ~3000px); ahora cada una se revela sola. El ≡ de la 08 ya no tapa un entregable, título equilibrado, etiqueta a 12px, sin elevar al hover lo que no es clicable. - Disciplinas: la frase «No son la promesa — son los medios» gana peso y se agrupa con título e ilustración; sin cortes huérfanos en móvil. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3242a8bf71
commit
89e54a6e84
73 files changed
+5261
-592
No files matched your search
@@ -1,6 +1,8 @@
|
||||
import { Wordmark } from '@/components/primitives/Wordmark';
|
||||
import { Container } from '@/components/primitives/Container';
|
||||
import { footer, creditosFotos } from '@/lib/content';
|
||||
import { IconoRed, NOMBRES_RED } from '@/components/primitives/IconoRed';
|
||||
import { footer, creditosFotos, empezar } from '@/lib/content';
|
||||
import { esExterno, propsEnlace, AVISO_PESTANA } from '@/lib/enlaces';
|
||||
|
||||
export function Footer() {
|
||||
return (
|
||||
@@ -8,6 +10,19 @@ export function Footer() {
|
||||
<Container className="flex flex-col items-center gap-3 py-10 text-center md:flex-row md:justify-between md:text-left">
|
||||
<Wordmark size="sm" onDark />
|
||||
<p className="text-sm text-gris-medio">{footer.tagline}</p>
|
||||
<ul aria-label="Redes y contacto" className="flex items-center gap-2">
|
||||
{NOMBRES_RED.map((red) => (
|
||||
<li key={red}>
|
||||
<a href={empezar.contacto[red].href} {...propsEnlace(empezar.contacto[red].href)}
|
||||
aria-label={esExterno(empezar.contacto[red].href)
|
||||
? `${empezar.contacto[red].label} (${AVISO_PESTANA})`
|
||||
: empezar.contacto[red].label}
|
||||
className="grid place-items-center w-10 h-10 rounded-full text-gris-medio hover:text-dorado transition-colors">
|
||||
<IconoRed nombre={red} className="w-5 h-5" />
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<p className="text-xs text-gris-medio">{footer.legal}</p>
|
||||
</Container>
|
||||
<Container className="pb-6 text-center md:text-left">
|
||||
@@ -15,8 +30,8 @@ export function Footer() {
|
||||
{creditosFotos.map((c, i) => (
|
||||
<span key={c.href}>
|
||||
{i > 0 && ' · '}
|
||||
<a href={c.href} className="hover:text-gris-medio">{c.desc}</a>, modificada,{' '}
|
||||
<a href={c.licenciaHref} className="hover:text-gris-medio">{c.licencia}</a>
|
||||
<a href={c.href} {...propsEnlace(c.href)} className="hover:text-gris-medio">{c.desc}<span className="sr-only"> ({AVISO_PESTANA})</span></a>, modificada,{' '}
|
||||
<a href={c.licenciaHref} {...propsEnlace(c.licenciaHref)} className="hover:text-gris-medio">{c.licencia}<span className="sr-only"> ({AVISO_PESTANA})</span></a>
|
||||
</span>
|
||||
))}
|
||||
</p>
|
||||
|
||||
@@ -29,3 +29,29 @@ describe('<Footer />', () => {
|
||||
expect(screen.getAllByText(/modificada/)).toHaveLength(creditosFotos.length);
|
||||
});
|
||||
});
|
||||
|
||||
describe('<Footer /> — redes', () => {
|
||||
it('links every contact channel by name, since the icons alone say nothing to a screen reader', () => {
|
||||
render(<Footer />);
|
||||
const lista = screen.getByRole('list', { name: /redes y contacto/i });
|
||||
expect(lista.querySelectorAll('a')).toHaveLength(3);
|
||||
expect(screen.getByRole('link', { name: /^WhatsApp/ })).toHaveAttribute('href', expect.stringMatching(/^https:\/\/wa\.me\//));
|
||||
expect(screen.getByRole('link', { name: 'Email' })).toHaveAttribute('href', expect.stringMatching(/^mailto:/));
|
||||
expect(screen.getByRole('link', { name: /^LinkedIn/ })).toHaveAttribute('href', expect.stringMatching(/linkedin\./));
|
||||
});
|
||||
|
||||
it('opens every outside link in a new tab, so the reader keeps the page', () => {
|
||||
render(<Footer />);
|
||||
for (const a of screen.getAllByRole('link')) {
|
||||
const href = a.getAttribute('href') ?? '';
|
||||
if (/^https?:/.test(href)) {
|
||||
expect(a).toHaveAttribute('target', '_blank');
|
||||
expect(a).toHaveAttribute('rel', 'noopener noreferrer');
|
||||
expect(a).toHaveAccessibleName(/se abre en otra pestaña/);
|
||||
} else {
|
||||
// mailto: in a new tab only leaves an empty tab behind.
|
||||
expect(a).not.toHaveAttribute('target');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user