fix(mail): use inline paw SVG instead of emoji in branded header (Gitea #21)
The 🐾 emoji rendered inconsistently across mail clients/OS fonts and looked off-brand. Replaces it with the exact lucide-react "paw-print" mark (same path data as the landing page's filled paw icon) inlined as raw SVG in the email header. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
19f22102df
commit
fd6f1f0564
1 file changed
+23
-3
@@ -25,6 +25,19 @@ const ORANGE_50 = "#fff7ed";
|
||||
const TEXT_MUTED = "#78716c";
|
||||
const TEXT_BODY = "#292524";
|
||||
|
||||
/**
|
||||
* Same mark as the landing page's filled paw icon (lucide-react "paw-print",
|
||||
* fill="currentColor" strokeWidth={0} — see src/app/page.tsx navbar/hero).
|
||||
* Inlined as raw SVG rather than an emoji so the header matches the brand
|
||||
* mark exactly instead of relying on the recipient's OS emoji font.
|
||||
*/
|
||||
const PAW_MARK_SVG = `<svg width="28" height="28" viewBox="0 0 24 24" fill="#ffffff" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="PawFeed">
|
||||
<circle cx="11" cy="4" r="2" />
|
||||
<circle cx="18" cy="8" r="2" />
|
||||
<circle cx="20" cy="16" r="2" />
|
||||
<path d="M9 10a5 5 0 0 1 5 5v3.5a3.5 3.5 0 0 1-6.84 1.045Q6.52 17.48 4.46 16.84A3.5 3.5 0 0 1 5.5 10Z" />
|
||||
</svg>`;
|
||||
|
||||
export function buildGreeting(firstName?: string | null): string {
|
||||
return firstName ? `Hallo ${firstName},` : "Hallo,";
|
||||
}
|
||||
@@ -70,9 +83,16 @@ export function renderBrandedMailHtml({
|
||||
<table role="presentation" width="600" cellpadding="0" cellspacing="0" border="0" style="max-width: 600px; width: 100%; background-color: #ffffff; border-radius: 20px; overflow: hidden;">
|
||||
<tr>
|
||||
<td style="background-color: ${ORANGE_500}; padding: 36px 40px;" align="center">
|
||||
<div style="font-family: 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 26px; font-weight: 800; color: #ffffff; letter-spacing: -0.02em;">
|
||||
🐾 PawFeed
|
||||
</div>
|
||||
<table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 0 auto;">
|
||||
<tr>
|
||||
<td style="vertical-align: middle; padding-right: 10px; line-height: 0;">
|
||||
${PAW_MARK_SVG}
|
||||
</td>
|
||||
<td style="vertical-align: middle;">
|
||||
<span style="font-family: 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 26px; font-weight: 800; color: #ffffff; letter-spacing: -0.02em;">PawFeed</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="font-family: 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 500; color: ${ORANGE_50}; margin-top: 6px;">
|
||||
Where pets are the stars.
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user