11"""Goldlabel branded HTML email template."""
22
33_LOGO_URL = "https://goldlabel.pro/goldlabelpro/png/favicon.png"
4+ _BASE_URL = "https://goldlabel.pro"
45
56# Palette (dark theme used for the email chrome; body text stays readable on white clients)
67_DARK_BG = "#364450"
78_DARK_PAPER = "#364450"
89_DARK_PRIMARY = "#ffd849"
910_DARK_TEXT = "#ffffff"
10- _LIGHT_BG = "#eaf0f5"
11- _LIGHT_PAPER = "#EEF7FF"
11+ _LIGHT_PAPER = "#ffffff"
1212_LIGHT_TEXT = "#000000"
1313_LIGHT_PRIMARY = "#364450"
1414
1515
16- def goldlabel_email (subject : str , body_html : str ) -> str :
16+ def goldlabel_email (
17+ subject : str ,
18+ body_html : str ,
19+ cta_label : str = "Call To Action" ,
20+ cta_url : str = _BASE_URL ,
21+ ) -> str :
1722 """Return a complete HTML email string with Goldlabel branding.
1823
1924 Args:
2025 subject: Used as the visible heading inside the email.
2126 body_html: Inner HTML content placed in the message body area.
27+ cta_label: Label rendered in the full-width call-to-action button.
28+ cta_url: Destination URL for the call-to-action button.
2229
2330 Returns:
2431 A self-contained HTML string ready to pass to send_email_resend().
@@ -40,83 +47,98 @@ def goldlabel_email(subject: str, body_html: str) -> str:
4047 /* ── Base ──────────────────────────────────────── */
4148 body {{
4249 margin: 0; padding: 0;
43- background-color: { _LIGHT_BG } ;
50+ background-color: #ffffff ;
4451 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
4552 color: { _LIGHT_TEXT } ;
4653 }}
4754
4855 /* ── Dark-mode overrides ───────────────────────── */
4956 @media (prefers-color-scheme: dark) {{
50- body, .email-wrapper {{ background-color: { _DARK_BG } !important; color: { _DARK_TEXT } !important; }}
57+ body, .email-wrapper {{ background-color: #ffffff !important; color: { _DARK_TEXT } !important; }}
5158 .email-card {{ background-color: { _DARK_PAPER } !important; color: { _DARK_TEXT } !important; }}
52- .email-header {{ background-color: { _DARK_BG } !important; }}
59+ .email-header-inner {{ background-color: { _DARK_BG } !important; }}
5360 .email-footer {{ background-color: { _DARK_BG } !important; color: { _DARK_TEXT } !important; }}
5461 .email-subject {{ color: { _DARK_PRIMARY } !important; }}
62+ .email-cta {{ background-color: { _DARK_PRIMARY } !important; color: { _DARK_BG } !important; }}
5563 a {{ color: { _DARK_PRIMARY } !important; }}
5664 }}
5765 </style>
5866</head>
5967<body class="email-wrapper">
6068 <!-- Outer wrapper -->
6169 <table role="presentation" width="100%" cellpadding="0" cellspacing="0"
62- style="background-color: { _LIGHT_BG } ; padding: 32px 0;">
70+ style="padding: 0;">
6371 <tr>
6472 <td align="center">
6573
6674 <!-- Card -->
6775 <table role="presentation" class="email-card" width="600" cellpadding="0" cellspacing="0"
6876 style="max-width:600px; width:100%; background-color:{ _LIGHT_PAPER } ;
69- border-radius:8px ; overflow:hidden;
70- box-shadow: 0 2px 8px rgba(0,0,0,0.10) ;">
77+ border-radius:6px ; overflow:hidden;
78+ box-shadow:none ;">
7179
7280 <!-- Header -->
7381 <tr>
74- <td class="email-header" align="center"
75- style="background-color:{ _DARK_BG } ; padding: 28px 40px;">
76- <img src="{ _LOGO_URL } "
77- width="48" height="48"
78- alt="Goldlabel"
79- style="width:48px; height:48px; border-radius:8px;" />
80- </td>
81- </tr>
82-
83- <!-- Subject banner -->
84- <tr>
85- <td align="left"
86- style="padding: 28px 40px 0 40px;">
87- <h1 class="email-subject"
88- style="margin:0; font-size:22px; font-weight:700;
89- color:{ _LIGHT_PRIMARY } ; line-height:1.3;">
90- { subject }
91- </h1>
82+ <td class="email-header" align="left"
83+ style="padding:24px 40px 0 40px;">
84+ <table role="presentation" width="100%" cellpadding="0" cellspacing="0" class="email-header-inner"
85+ style="background-color:{ _LIGHT_PRIMARY } ; border-radius:6px;">
86+ <tr>
87+ <td align="left" valign="middle" style="padding:20px 16px 20px 20px; width:1%; white-space:nowrap;">
88+ <a href="{ _BASE_URL } " style="text-decoration:none; display:inline-block;">
89+ <img src="{ _LOGO_URL } "
90+ width="48" height="48"
91+ alt="Goldlabel"
92+ style="width:48px; height:48px; border-radius:6px;" />
93+ </a>
94+ </td>
95+ <td align="left" valign="middle" style="padding:20px 20px 20px 0;">
96+ <h1 class="email-subject"
97+ style="margin:0; font-size:22px; font-weight:700;
98+ color:#ffffff; line-height:1.3;">
99+ { subject }
100+ </h1>
101+ </td>
102+ </tr>
103+ </table>
92104 </td>
93105 </tr>
94106
95107 <!-- Body -->
96108 <tr>
97109 <td align="left"
98- style="padding: 20px 40px 32px 40px;
110+ style="padding: 30px 40px 24px 40px;
99111 font-size:15px; line-height:1.7; color:{ _LIGHT_TEXT } ;">
100112 { body_html }
101113 </td>
102114 </tr>
103115
104- <!-- Divider -->
116+ <!-- CTA -->
105117 <tr>
106- <td style="padding: 0 40px;">
107- <hr style="border:none; border-top:1px solid { _DARK_PRIMARY } ; margin:0;" />
118+ <td align="left" style="padding: 0 40px 28px 40px;">
119+ <a class="email-cta"
120+ href="{ cta_url } "
121+ style="display:block; width:100%; box-sizing:border-box;
122+ background-color:{ _LIGHT_PRIMARY } ; color:#ffffff;
123+ font-size:16px; font-weight:700; text-align:center;
124+ text-decoration:none; border-radius:6px;
125+ padding:14px 20px;">
126+ { cta_label }
127+ </a>
108128 </td>
109129 </tr>
110130
131+
111132 <!-- Footer -->
112133 <tr>
113134 <td class="email-footer" align="center"
114135 style="padding: 20px 40px;
115136 font-size:12px; color:#666666;">
116- <a href="https://goldlabel.pro"
117- style="color:{ _LIGHT_PRIMARY } ; text-decoration:none;">goldlabel.pro</a>
118- ·
119- You received this email because a request was made via the NX° API.
137+ <a href="https://github.com/goldlabelapps/python"
138+ style="color:{ _LIGHT_PRIMARY } ; text-decoration:none;">
139+ Sent with Python°
140+ </a>
141+
120142 </td>
121143 </tr>
122144
0 commit comments