Merge: brand-align mentorship welcome emails
All checks were successful
Build and Push Docker Image / build (push) Successful in 9m10s

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matt
2026-06-01 18:21:49 +02:00

View File

@@ -2876,9 +2876,7 @@ export function getTeamMentorIntroductionTemplate(
'The MOPC team',
].join('\n')
const customNoteHtml = customNote
? `<div style="margin:0 0 16px;padding:12px 16px;background:#fff7ed;border-left:3px solid #de0f1e;border-radius:4px;color:#0f172a;">${escapeHtml(customNote)}</div>`
: ''
const noteHtml = customNote ? infoBox(escapeHtml(customNote), 'warning') : ''
const mentorHtmlList = mentors
.map(
@@ -2905,44 +2903,30 @@ export function getTeamMentorIntroductionTemplate(
.join('')}</table>`
: ''
const instructionsHtml = `
<div style="margin:16px 0;padding:12px 16px;background:#eff6ff;border-left:3px solid #3b82f6;border-radius:4px;">
<strong style="color:#1e40af;">Working with your mentor</strong>
<ul style="margin:8px 0 0 20px;padding:0;color:#0f172a;font-size:13px;">
<li style="margin:4px 0;">Go to the Mentoring section of your applicant portal to message your mentor directly they are notified by email when you write.</li>
<li style="margin:4px 0;">Share documents and questions early; your mentor is here to help you sharpen your project before the finals.</li>
<li style="margin:4px 0;">You can also email your mentor directly using the address above.</li>
</ul>
</div>`
const instructionsHtml = infoBox(
`<strong>Working with your mentor</strong><br>` +
`&bull; Go to the Mentoring section of your applicant portal to message your mentor directly — they are notified by email when you write.<br>` +
`&bull; Share documents and questions early; your mentor is here to help you sharpen your project before the finals.<br>` +
`&bull; You can also email your mentor directly using the address above.`,
'info',
)
const html = `
<!DOCTYPE html>
<html>
<body style="margin:0;padding:0;background:#f6f8fa;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;color:#0f172a;">
<div style="max-width:560px;margin:32px auto;background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,0.06);">
<div style="background:#053d57;padding:24px 28px;color:#fefefe;">
<h1 style="margin:0;font-size:20px;font-weight:600;">${count === 1 ? 'Meet your mentor' : `Meet your ${count} mentors`}</h1>
</div>
<div style="padding:24px 28px;line-height:1.5;font-size:14px;">
<p style="margin-top:0;">${recipientName ? `Hi ${escapeHtml(recipientName)},` : 'Hi there,'}</p>
${customNoteHtml}
<p>${count === 1
const content = `
${sectionTitle(count === 1 ? 'Meet your mentor' : `Meet your ${count} mentors`)}
${paragraph(recipientName ? `Hi ${escapeHtml(recipientName)},` : 'Hi there,')}
${noteHtml}
${paragraph(
count === 1
? `The mentoring round is now open and a mentor has been assigned to your project <strong>${escapeHtml(projectTitle)}</strong>:`
: `The mentoring round is now open and <strong>${count}</strong> mentors have been assigned to your project <strong>${escapeHtml(projectTitle)}</strong>:`}</p>
<table style="width:100%;border-collapse:collapse;margin:12px 0 8px;font-size:14px;">${mentorHtmlList}</table>
${teammatesHtml}
${instructionsHtml}
<p style="margin-top:24px;">
<a href="${workspaceUrl}" style="display:inline-block;padding:10px 20px;background:#de0f1e;color:#fff;text-decoration:none;border-radius:6px;font-weight:600;">Open Mentor Workspace</a>
</p>
</div>
<div style="padding:16px 28px;background:#f1f5f9;color:#64748b;font-size:12px;text-align:center;">
Monaco Ocean Protection Challenge
</div>
</div>
</body>
</html>
`.trim()
: `The mentoring round is now open and <strong>${count}</strong> mentors have been assigned to your project <strong>${escapeHtml(projectTitle)}</strong>:`,
)}
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="border-collapse:collapse;margin:8px 0;font-size:14px;">${mentorHtmlList}</table>
${teammatesHtml}
${instructionsHtml}
${ctaButton(workspaceUrl, 'Open Mentor Workspace')}
`
const html = getEmailWrapper(content)
return { subject, text, html }
}
@@ -3034,9 +3018,7 @@ export function getMentorBulkAssignmentTemplate(
'The MOPC team',
].join('\n')
const customNoteHtml = customNote
? `<div style="margin:0 0 16px;padding:12px 16px;background:#fff7ed;border-left:3px solid #de0f1e;border-radius:4px;color:#0f172a;">${escapeHtml(customNote)}</div>`
: ''
const noteHtml = customNote ? infoBox(escapeHtml(customNote), 'warning') : ''
const htmlList = projects
.map((p) => {
@@ -3053,41 +3035,25 @@ export function getMentorBulkAssignmentTemplate(
})
.join('')
const instructionsHtml = `
<div style="margin:16px 0;padding:12px 16px;background:#eff6ff;border-left:3px solid #3b82f6;border-radius:4px;">
<strong style="color:#1e40af;">How to mentor on MOPC</strong>
<ul style="margin:8px 0 0 20px;padding:0;color:#0f172a;font-size:13px;">
<li style="margin:4px 0;">Open each project workspace from your Mentor Dashboard to chat with the team, share files, and track milestones.</li>
<li style="margin:4px 0;">Messages you send in the workspace notify the team by email automatically.</li>
<li style="margin:4px 0;">You can also email team members directly using the addresses listed above.</li>
</ul>
</div>`
const instructionsHtml = infoBox(
`<strong>How to mentor on MOPC</strong><br>` +
`&bull; Open each project workspace from your Mentor Dashboard to chat with the team, share files, and track milestones.<br>` +
`&bull; Messages you send in the workspace notify the team by email automatically.<br>` +
`&bull; You can also email team members directly using the addresses listed above.`,
'info',
)
const html = `
<!DOCTYPE html>
<html>
<body style="margin:0;padding:0;background:#f6f8fa;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;color:#0f172a;">
<div style="max-width:560px;margin:32px auto;background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,0.06);">
<div style="background:#053d57;padding:24px 28px;color:#fefefe;">
<h1 style="margin:0;font-size:20px;font-weight:600;">${count === 1 ? 'New mentor assignment' : `${count} new mentor assignments`}</h1>
</div>
<div style="padding:24px 28px;line-height:1.5;font-size:14px;">
<p style="margin-top:0;">${name ? `Hi ${escapeHtml(name)},` : 'Hi there,'}</p>
${customNoteHtml}
<p>${count === 1 ? 'You have been assigned as a mentor to a new project:' : `You have been assigned as a mentor to <strong>${count}</strong> new projects:`}</p>
<ul style="padding-left:20px;margin:12px 0 20px;">${htmlList}</ul>
${instructionsHtml}
<p style="margin-top:24px;">
<a href="${mentorDashboardUrl}" style="display:inline-block;padding:10px 20px;background:#de0f1e;color:#fff;text-decoration:none;border-radius:6px;font-weight:600;">Open Mentor Dashboard</a>
</p>
</div>
<div style="padding:16px 28px;background:#f1f5f9;color:#64748b;font-size:12px;text-align:center;">
Monaco Ocean Protection Challenge
</div>
</div>
</body>
</html>
`.trim()
const content = `
${sectionTitle(count === 1 ? 'New mentor assignment' : `${count} new mentor assignments`)}
${paragraph(name ? `Hi ${escapeHtml(name)},` : 'Hi there,')}
${noteHtml}
${paragraph(count === 1 ? 'You have been assigned as a mentor to a new project:' : `You have been assigned as a mentor to <strong>${count}</strong> new projects:`)}
<ul style="padding-left:20px;margin:12px 0 20px;color:${BRAND.textDark};font-size:15px;">${htmlList}</ul>
${instructionsHtml}
${ctaButton(mentorDashboardUrl, 'Open Mentor Dashboard')}
`
const html = getEmailWrapper(content)
return { subject, text, html }
}