diff --git a/kit/ejemplos/noticia/ejemplo.json b/kit/ejemplos/noticia/ejemplo.json index f9ae7c2..64d8eeb 100644 --- a/kit/ejemplos/noticia/ejemplo.json +++ b/kit/ejemplos/noticia/ejemplo.json @@ -1,6 +1,32 @@ -{"out":"../../../_preview","prefix":"ejemplo_noticia","numbered":true, - "slides":[ - {"photo":"valencia.jpg","pos":"30% 60%","kicker":"VALENCIA · 29 OCT 2024","title":"Dos años de la DANA","sub":"Entradilla breve con el dato clave de la noticia.","credit":"Foto de ejemplo","ribbon":true}, - {"html":"
LO QUE PENSAMOS

Texto de opinión del partido sobre la noticia.

Lámina opcional: solo si la noticia necesita contexto.
"}, - {"html":"
Unidad, Fe y Destino
"} - ]} +{ + "out": "../../../_preview", + "prefix": "ejemplo_noticia", + "numbered": true, + "slides": [ + { + "photo": "valencia.jpg", + "pos": "30% 60%", + "kicker": "VALENCIA · 29 OCT 2024", + "title": "Dos años de la DANA", + "sub": "Entradilla breve con el dato clave de la noticia.", + "credit": "Foto de ejemplo", + "ribbon": true + }, + { + "photo": "valencia.jpg", + "pos": "40% 55%", + "kicker": "VALENCIA · 29 OCT 2024", + "title": "Dos años de la DANA", + "sub": "Entradilla breve con el dato clave de la noticia.", + "credit": "Foto de ejemplo", + "ribbon": false, + "band": false + }, + { + "html": "
LO QUE PENSAMOS

Texto de opinión del partido sobre la noticia.

Lámina opcional: solo si la noticia necesita contexto.
" + }, + { + "html": "
Unidad, Fe y Destino
" + } + ] +} \ No newline at end of file diff --git a/kit/ejemplos/noticia/render/ejemplo_noticia_1.png b/kit/ejemplos/noticia/render/ejemplo_noticia_1.png index ddc9062..534d412 100644 Binary files a/kit/ejemplos/noticia/render/ejemplo_noticia_1.png and b/kit/ejemplos/noticia/render/ejemplo_noticia_1.png differ diff --git a/kit/ejemplos/noticia/render/ejemplo_noticia_2.png b/kit/ejemplos/noticia/render/ejemplo_noticia_2.png index f61d2ef..a1d42c4 100644 Binary files a/kit/ejemplos/noticia/render/ejemplo_noticia_2.png and b/kit/ejemplos/noticia/render/ejemplo_noticia_2.png differ diff --git a/kit/ejemplos/noticia/render/ejemplo_noticia_3.png b/kit/ejemplos/noticia/render/ejemplo_noticia_3.png index 6d4d28f..4c05671 100644 Binary files a/kit/ejemplos/noticia/render/ejemplo_noticia_3.png and b/kit/ejemplos/noticia/render/ejemplo_noticia_3.png differ diff --git a/kit/ejemplos/noticia/render/ejemplo_noticia_4.png b/kit/ejemplos/noticia/render/ejemplo_noticia_4.png new file mode 100644 index 0000000..951b14e Binary files /dev/null and b/kit/ejemplos/noticia/render/ejemplo_noticia_4.png differ diff --git a/kit/noticia.mjs b/kit/noticia.mjs index 55ec5b2..22ba6d1 100644 --- a/kit/noticia.mjs +++ b/kit/noticia.mjs @@ -2,7 +2,8 @@ // Uso: node noticia.mjs spec.json // spec = { out: "dir", prefix: "nombre", numbered: true, // slides: [ { photo: "ruta.jpg", pos: "50% 40%", kicker: "JEREZ · 30 OCT", title: "Titular", -// sub: "Entradilla opcional", credit: "Foto: Diario de Jerez", ribbon: false, html: "" } ] } +// sub: "Entradilla opcional", credit: "Foto: Diario de Jerez", ribbon: false, band: true, html: "" } ] } +// band: false → sin banda: foto a toda la lámina y el logo pequeño en la esquina (estilo del pésame por el papa Francisco). // Una lámina sin photo usa fondo granate liso (para el cierre con logo o texto). import fs from 'fs'; import path from 'path'; @@ -44,7 +45,7 @@ h1 b{color:#F2C64B} .sub b{color:#F2C64B;font-weight:500} .cred{position:absolute;right:22px;top:162px;font-family:Garamond;font-style:italic;font-size:20px;color:#FBF3E4;opacity:.85;text-shadow:0 1px 4px #000;writing-mode:vertical-rl;transform:rotate(180deg);transform-origin:center} .num{position:absolute;right:70px;bottom:30px;font-family:Cinzel;font-weight:700;font-size:20px;letter-spacing:3px;color:#D9A63A} -.ribbon{position:absolute;right:60px;top:200px;width:150px} +.corner{position:absolute;left:34px;top:30px;width:150px;filter:drop-shadow(0 3px 8px rgba(0,0,0,.6))} .full{top:0} .ribbon{position:absolute;right:60px;top:200px;width:150px} `; const browser = await chromium.launch({ executablePath: '/opt/pw-browsers/chromium', args: ['--no-sandbox'] }); @@ -55,8 +56,8 @@ const N = spec.slides.length; for (const [i, sl] of spec.slides.entries()) { const body = (sl.html || '').replaceAll('{{LOGO}}', LOGO).replaceAll('{{HORSE}}', HORSE); const html = `
- ${sl.photo ? `
` : ''} -
PARTIDO NACIONALHISPANISTA
+ ${sl.photo ? `
` : ''} + ${sl.band === false ? `` : `
PARTIDO NACIONALHISPANISTA
`} ${sl.credit ? `
${sl.credit}
` : ''} ${sl.ribbon ? `` : ''} ${sl.title || sl.kicker ? `
${sl.kicker ? `
${sl.kicker}
` : ''}${sl.title ? `

${sl.title}

` : ''}${sl.sub ? `
${sl.sub}
` : ''}
` : ''}