Skip to content

Commit c3c4c68

Browse files
committed
Refactor email header layout and shrink logo
Rework the email header to an inline two-cell layout for better vertical alignment: remove the fixed width, set the header inner table to display:table, and split the logo and subject into separate TDs. Reduce the logo from 48px to 32px, adjust paddings, border-radius, vertical alignment, and lighten the subject font weight for a more compact, balanced header in narrow clients. Also remove the obsolete goldlabel.bak.py backup file.
1 parent 2a95d9c commit c3c4c68

2 files changed

Lines changed: 10 additions & 138 deletions

File tree

app/utils/email_templates/goldlabel.bak.py

Lines changed: 0 additions & 130 deletions
This file was deleted.

app/utils/email_templates/goldlabel.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,21 @@ def goldlabel_email(
7878
<tr>
7979
<td class="email-header" align="center"
8080
style="padding:24px 40px 0 40px;">
81-
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" class="email-header-inner"
82-
style="background-color:{_SECONDARY_BG}; border-radius:6px; max-width:300px; margin:0 auto;">
81+
<table role="presentation" cellpadding="0" cellspacing="0" class="email-header-inner"
82+
style="background-color:{_SECONDARY_BG}; border-radius:6px; margin:0 auto; display:table;">
8383
<tr>
84-
<td align="center" valign="middle" style="padding:20px;">
85-
<a href="{_BASE_URL}" style="text-decoration:none; display:inline-block;">
84+
<td align="center" valign="middle" style="padding:20px 16px; white-space:nowrap;">
85+
<a href="{_BASE_URL}" style="text-decoration:none; display:inline-block; vertical-align:middle;">
8686
<img src="{_LOGO_URL}"
87-
width="48" height="48"
87+
width="32" height="32"
8888
alt="Virus°"
89-
style="width:48px; height:48px; border-radius:6px; display:block; margin:0 auto 10px auto;" />
89+
style="width:32px; height:32px; border-radius:4px; display:inline-block; vertical-align:middle;" />
9090
</a>
91+
</td>
92+
<td align="center" valign="middle" style="padding:20px 16px 20px 0;">
9193
<h1 class="email-subject"
92-
style="margin:0; font-size:22px; font-weight:700;
93-
color:{_DARK_TEXT}; line-height:1.3;">
94+
style="margin:0; font-size:22px; font-weight:400;
95+
color:{_DARK_TEXT}; line-height:1.3; display:inline-block; vertical-align:middle;">
9496
{subject}
9597
</h1>
9698
</td>

0 commit comments

Comments
 (0)