Style welcome email to match landing page (centered card, logo, green button)
This commit is contained in:
1 parent
c1866df2a4
commit
14e838a798
1 file changed
+64
-15
+64
-15
@@ -296,7 +296,12 @@ def send_email(to: str, subject: str, text_body: str, html_body: str | None = No
|
|||||||
|
|
||||||
|
|
||||||
def welcome_email(name: str) -> tuple[str, str, str]:
|
def welcome_email(name: str) -> tuple[str, str, str]:
|
||||||
"""Build the welcome email (subject, text, html) for a new member."""
|
"""Build the welcome email (subject, text, html) for a new member.
|
||||||
|
|
||||||
|
The HTML uses a centered, card-style layout matching the landing page
|
||||||
|
(cream background, forest-green button, Figtree-like system fonts).
|
||||||
|
Email HTML is table-based for client compatibility; no external assets.
|
||||||
|
"""
|
||||||
join_url = f"{PORTAL_BASE}/join"
|
join_url = f"{PORTAL_BASE}/join"
|
||||||
subject = "Welcome to the Inference Cooperative — finish your setup"
|
subject = "Welcome to the Inference Cooperative — finish your setup"
|
||||||
text = (
|
text = (
|
||||||
@@ -310,20 +315,64 @@ def welcome_email(name: str) -> tuple[str, str, str]:
|
|||||||
"Questions? Reply to this email or write to info@inference.coop.\n\n"
|
"Questions? Reply to this email or write to info@inference.coop.\n\n"
|
||||||
"— The Inference Cooperative\n"
|
"— The Inference Cooperative\n"
|
||||||
)
|
)
|
||||||
html = (
|
html = f"""<!DOCTYPE html>
|
||||||
f"<p>Hi {name},</p>"
|
<html lang="en">
|
||||||
"<p>Thanks for joining the <strong>Inference Cooperative</strong>!</p>"
|
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"></head>
|
||||||
"<p>To finish setting up your account and start using private AI chat, "
|
<body style="margin:0;padding:0;background:#faf8f5;font-family:-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;">
|
||||||
"click the button below and connect your Open Collective account:</p>"
|
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background:#faf8f5;padding:40px 16px;">
|
||||||
f'<p><a href="{join_url}" style="display:inline-block;padding:12px 24px;'
|
<tr>
|
||||||
'background:#5b8c5a;color:#fff;text-decoration:none;border-radius:8px;">'
|
<td align="center">
|
||||||
"Finish setup</a></p>"
|
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="max-width:520px;">
|
||||||
"<p>This takes about a minute. You'll then get an account-setup email "
|
<tr>
|
||||||
"from our platform.</p>"
|
<td align="center" style="padding-bottom:24px;">
|
||||||
'<p>Questions? Reply to this email or write to '
|
<!-- Pine-tree circle logo (simplified) -->
|
||||||
'<a href="mailto:info@inference.coop">info@inference.coop</a>.</p>'
|
<svg width="56" height="56" viewBox="0 0 130 130" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||||
"<p>— The Inference Cooperative</p>"
|
<circle cx="65" cy="14" r="5" fill="#5b8c5a"/>
|
||||||
)
|
<circle cx="58" cy="30" r="6" fill="#7ab87a"/>
|
||||||
|
<circle cx="74" cy="30" r="4" fill="#6ba86b"/>
|
||||||
|
<circle cx="51.5" cy="46" r="6.5" fill="#5b8c5a"/>
|
||||||
|
<circle cx="65" cy="46" r="5" fill="#7ab87a"/>
|
||||||
|
<circle cx="81" cy="46" r="4" fill="#6ba86b"/>
|
||||||
|
<circle cx="44" cy="62" r="7" fill="#6ba86b"/>
|
||||||
|
<circle cx="61" cy="62" r="5.5" fill="#5b8c5a"/>
|
||||||
|
<circle cx="76" cy="62" r="4.5" fill="#7ab87a"/>
|
||||||
|
<circle cx="89.5" cy="62" r="3.5" fill="#6ba86b"/>
|
||||||
|
<circle cx="36.5" cy="78" r="7.5" fill="#5b8c5a"/>
|
||||||
|
<circle cx="54" cy="78" r="6" fill="#7ab87a"/>
|
||||||
|
<circle cx="70" cy="78" r="5" fill="#6ba86b"/>
|
||||||
|
<circle cx="84" cy="78" r="4" fill="#5b8c5a"/>
|
||||||
|
<circle cx="97.5" cy="78" r="3.5" fill="#7ab87a"/>
|
||||||
|
<circle cx="44" cy="94" r="6.5" fill="#6ba86b"/>
|
||||||
|
<circle cx="61" cy="94" r="5.5" fill="#5b8c5a"/>
|
||||||
|
<circle cx="76" cy="94" r="4.5" fill="#7ab87a"/>
|
||||||
|
<circle cx="89.5" cy="94" r="3.5" fill="#6ba86b"/>
|
||||||
|
<circle cx="51.5" cy="110" r="5.5" fill="#5b8c5a"/>
|
||||||
|
<circle cx="65" cy="110" r="4.5" fill="#7ab87a"/>
|
||||||
|
<circle cx="81" cy="110" r="3.5" fill="#6ba86b"/>
|
||||||
|
</svg>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" style="background:#ffffff;border:1px solid #e8e2d8;border-radius:16px;padding:40px 32px;">
|
||||||
|
<h1 style="margin:0 0 12px;font-size:24px;font-weight:700;color:#2d3327;">Welcome, {name}</h1>
|
||||||
|
<p style="margin:0 0 8px;font-size:16px;color:#6b7a62;line-height:1.5;">Thanks for joining the <strong style="color:#2d3327;">Inference Cooperative</strong>.</p>
|
||||||
|
<p style="margin:0 0 28px;font-size:15px;color:#6b7a62;line-height:1.5;">Finish setting up your account to start using private AI chat.</p>
|
||||||
|
<a href="{join_url}" style="display:inline-block;background:#5b8c5a;color:#ffffff;text-decoration:none;padding:14px 36px;border-radius:10px;font-size:16px;font-weight:600;">Finish setup</a>
|
||||||
|
<p style="margin:28px 0 0;font-size:13px;color:#94a08c;line-height:1.5;">This takes about a minute. You'll then get an account-setup email from our platform.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" style="padding-top:24px;font-size:13px;color:#94a08c;line-height:1.6;">
|
||||||
|
Questions? Reply to this email or write to <a href="mailto:info@inference.coop" style="color:#6b7a62;">info@inference.coop</a>.<br>
|
||||||
|
<span style="color:#2d3327;">The Inference Cooperative</span> · inference.coop
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>"""
|
||||||
return subject, text, html
|
return subject, text, html
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user