69e849d38e
Este repo local tenia origin apuntando al Gitea local (localhost:3000), que Rafa
declaro archivado el 2026-06-28 (commit 962f33a, desarrollo movido a
gitea.feadulta.com). Ese memo nunca llego a este checkout: main quedo congelado
y todo el trabajo real de las ultimas 3+ semanas se fue commiteando solo en la
rama fix/multiidioma-portada-132 (ya fusionada a main sin perdida, commit
2504666), mientras que ademas se acumulaban 78 cambios sin commitear en el
working tree que nunca llegaron a NINGUN historial de git.
Este commit consolida esos cambios sueltos: TTS multi-voz (tts_*.py), scripts
de traduccion (translate_haiku.py, pretranslate_en_haiku.py, sync_translations_to_prod.py),
mu-plugins nuevos desplegados a prod (fea-beta-feedback, fea-cloudflare-realip,
fea-legacy-redirect, fea-gsc-verification, fea-support-campaign, fea-ui, etc.),
scripts de mantenimiento de enlaces/cartas, capturas E2E (tools/e2e/shot_*.cjs)
y documentacion de sesiones recientes.
Excluido deliberadamente (no es codigo versionable): tts-voices/ (3.3GB de
muestras de audio para clonacion de voz, anadido a .gitignore), logs/ (logs de
ejecucion, anadido a .gitignore), y 2 ficheros vacios accidentales + 2 copias
duplicadas sueltas en la raiz que ya existen en su ubicacion correcta.
49 lines
2.2 KiB
JavaScript
49 lines
2.2 KiB
JavaScript
const { chromium } = require('playwright');
|
|
(async () => {
|
|
const url = 'https://farmer.taild3aaf6.ts.net/fea/primeras-lecturas/';
|
|
const b = await chromium.launch({ args: ['--ignore-certificate-errors'] });
|
|
const p = await b.newPage({ viewport: { width: 1440, height: 1600 }, ignoreHTTPSErrors: true, deviceScaleFactor: 2 });
|
|
await p.goto(url, { waitUntil: 'networkidle' });
|
|
|
|
// medidas: ancho del contenedor, ancho del viewport, alineación del título
|
|
const m1 = await p.evaluate(() => {
|
|
const lect = document.querySelector('.fea-lect');
|
|
const title = document.querySelector('.wp-block-post-title');
|
|
const ec = document.querySelector('.entry-content');
|
|
return {
|
|
viewport: window.innerWidth,
|
|
fea_lect_width: lect ? Math.round(lect.getBoundingClientRect().width) : null,
|
|
entry_content_width: ec ? Math.round(ec.getBoundingClientRect().width) : null,
|
|
title_text: title ? title.textContent.trim() : null,
|
|
title_align: title ? getComputedStyle(title).textAlign : null,
|
|
title_centered_box: title ? (Math.abs((title.getBoundingClientRect().left) - (window.innerWidth - title.getBoundingClientRect().right)) < 8) : null,
|
|
};
|
|
});
|
|
console.log('COLAPSADO:', JSON.stringify(m1, null, 2));
|
|
await p.screenshot({ path: '/tmp/lecturas_collapsed.png', fullPage: false });
|
|
|
|
// abrir la 1ª sección (1ª lectura) y el primer libro
|
|
await p.evaluate(() => {
|
|
const tops = document.querySelectorAll('.fea-lect > details.fea-lect-top');
|
|
if (tops[0]) tops[0].open = true;
|
|
});
|
|
await p.waitForTimeout(150);
|
|
await p.evaluate(() => {
|
|
const first = document.querySelector('.fea-lect > details.fea-lect-top details');
|
|
if (first) first.open = true;
|
|
});
|
|
await p.waitForTimeout(150);
|
|
|
|
const m2 = await p.evaluate(() => {
|
|
const ul = document.querySelector('.fea-lect details details[open] ul');
|
|
return {
|
|
ul_columns: ul ? getComputedStyle(ul).columnWidth + ' / count ' + getComputedStyle(ul).columnCount : null,
|
|
ul_width: ul ? Math.round(ul.getBoundingClientRect().width) : null,
|
|
};
|
|
});
|
|
console.log('EXPANDIDO:', JSON.stringify(m2, null, 2));
|
|
await p.screenshot({ path: '/tmp/lecturas_expanded.png', fullPage: false });
|
|
|
|
await b.close();
|
|
})();
|