style(email-template): arrondit davantage banner et bloc de code

- banner: border-radius 14 -> 18px
- bloc de code: fond et border-radius (14px) portés par le <pre> pour un
  arrondi fiable en aperçu, padding réduit (16x18 -> 12x14)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Guillaume DENIS 2026-07-08 15:39:45 +02:00
parent 63caa769a0
commit 572e88120e

View file

@ -1568,14 +1568,14 @@ function renderEmailHtml(src, ctx){
const color = m[1] || '#5b9cf5', buf = [];
for(i++; i < lines.length && !/^:::\s*$/.test(lines[i]); i++) buf.push(lines[i]);
i++;
html += '<div style="background:' + color + ';color:#fff;padding:24px 28px;border-radius:14px;font-size:20px;font-weight:700;line-height:1.35;margin:0 0 18px">' + inline(buf.join('<br>')) + '</div>';
html += '<div style="background:' + color + ';color:#fff;padding:24px 28px;border-radius:18px;font-size:20px;font-weight:700;line-height:1.35;margin:0 0 18px">' + inline(buf.join('<br>')) + '</div>';
continue;
}
if(/^```/.test(line)){
const buf = [];
for(i++; i < lines.length && !/^```/.test(lines[i]); i++) buf.push(lines[i]);
i++;
html += '<table role="presentation" cellpadding="0" cellspacing="0" style="margin:0 0 16px;border-collapse:separate"><tr><td style="background:#1d2026;color:#e6e6e6;padding:16px 18px;border-radius:12px;font-family:ui-monospace,Consolas,monospace;font-size:13px;line-height:1.55"><pre style="margin:0;overflow-x:auto;font-family:inherit"><code>' + buf.join('\n') + '</code></pre></td></tr></table>';
html += '<table role="presentation" cellpadding="0" cellspacing="0" style="margin:0 0 16px"><tr><td style="padding:0"><pre style="margin:0;background:#1d2026;color:#e6e6e6;padding:12px 14px;border-radius:14px;overflow-x:auto;font-family:ui-monospace,Consolas,monospace;font-size:13px;line-height:1.55"><code>' + buf.join('\n') + '</code></pre></td></tr></table>';
continue;
}
if(m = line.match(/^!\[([^\]]*)\]\(([^)]+)\)\s*$/)){