Add the logo and the web wordmark colors to e-mails
CI / Deploy / PHP 8.5 (push) Successful in 1m6s
CI / Deploy / PHP 8.4 (push) Successful in 1m10s
CI / Deploy / test (push) Successful in 2s
CI / Deploy / deploy (push) Skipped

The HTML layout now shows the logo (inline CID attachment, generated with
the favicon script) before "Plenar" in the text color and "IO" in the primary
color, like the site header. Muted gray and background match the web tokens.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-16 15:08:13 +01:00
1 parent 8262411225
commit 72b688186f
9 files changed
+96 -11

No files matched your search

+9 -1
View File
@@ -1,5 +1,5 @@
<?php
// Generates webroot/favicon.svg, favicon.ico and apple-touch-icon.png (needs ext-gd). Run after a logo change:
// Generates webroot/favicon.svg, favicon.ico, apple-touch-icon.png and resources/mail/logo.png (needs ext-gd). Run after a logo change:
// php resources/favicon/generate.php webroot
// Mirrors .brand__mark in webroot/css/plenario.css:
// rounded square (radius 6/22), conic gradient 40/25/20/15 % from 12 o'clock, clockwise.
@@ -126,6 +126,14 @@ foreach ($sizes as $i => $n) {
}
file_put_contents($out . '/favicon.ico', $ico . implode('', $images));
// Logo for e-mails (resources/mail/logo.png, attached inline by PollMailer): mail clients show no SVG.
// 96 px, displayed at 32 px for sharp edges on high-DPI screens.
$mailDir = dirname(__DIR__) . '/mail';
if (!is_dir($mailDir)) {
mkdir($mailDir, 0775, true);
}
file_put_contents($mailDir . '/logo.png', $render(96));
// iOS ignores transparency (fills black) and rounds the corners itself: opaque full-bleed square.
$apple = imagecreatetruecolor(180, 180);
$stopsPx = $stops;