diff --git a/src/lib/email.ts b/src/lib/email.ts
index b437d74..e4987f6 100644
--- a/src/lib/email.ts
+++ b/src/lib/email.ts
@@ -2876,9 +2876,7 @@ export function getTeamMentorIntroductionTemplate(
'The MOPC team',
].join('\n')
- const customNoteHtml = customNote
- ? `
${escapeHtml(customNote)}
`
- : ''
+ const noteHtml = customNote ? infoBox(escapeHtml(customNote), 'warning') : ''
const mentorHtmlList = mentors
.map(
@@ -2905,44 +2903,30 @@ export function getTeamMentorIntroductionTemplate(
.join('')}`
: ''
- const instructionsHtml = `
-
-
Working with your mentor
-
- - Go to the Mentoring section of your applicant portal to message your mentor directly — they are notified by email when you write.
- - Share documents and questions early; your mentor is here to help you sharpen your project before the finals.
- - You can also email your mentor directly using the address above.
-
-
`
+ const instructionsHtml = infoBox(
+ `Working with your mentor
` +
+ `• Go to the Mentoring section of your applicant portal to message your mentor directly — they are notified by email when you write.
` +
+ `• Share documents and questions early; your mentor is here to help you sharpen your project before the finals.
` +
+ `• You can also email your mentor directly using the address above.`,
+ 'info',
+ )
- const html = `
-
-
-
-
-
-
${count === 1 ? 'Meet your mentor' : `Meet your ${count} mentors`}
-
-
-
${recipientName ? `Hi ${escapeHtml(recipientName)},` : 'Hi there,'}
- ${customNoteHtml}
-
${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 ${escapeHtml(projectTitle)}:`
- : `The mentoring round is now open and ${count} mentors have been assigned to your project ${escapeHtml(projectTitle)}:`}
-
- ${teammatesHtml}
- ${instructionsHtml}
-
- Open Mentor Workspace
-
-
-
- Monaco Ocean Protection Challenge
-
-
-
-
- `.trim()
+ : `The mentoring round is now open and ${count} mentors have been assigned to your project ${escapeHtml(projectTitle)}:`,
+ )}
+
+ ${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
- ? `${escapeHtml(customNote)}
`
- : ''
+ const noteHtml = customNote ? infoBox(escapeHtml(customNote), 'warning') : ''
const htmlList = projects
.map((p) => {
@@ -3053,41 +3035,25 @@ export function getMentorBulkAssignmentTemplate(
})
.join('')
- const instructionsHtml = `
-
-
How to mentor on MOPC
-
- - Open each project workspace from your Mentor Dashboard to chat with the team, share files, and track milestones.
- - Messages you send in the workspace notify the team by email automatically.
- - You can also email team members directly using the addresses listed above.
-
-
`
+ const instructionsHtml = infoBox(
+ `How to mentor on MOPC
` +
+ `• Open each project workspace from your Mentor Dashboard to chat with the team, share files, and track milestones.
` +
+ `• Messages you send in the workspace notify the team by email automatically.
` +
+ `• You can also email team members directly using the addresses listed above.`,
+ 'info',
+ )
- const html = `
-
-
-
-
-
-
${count === 1 ? 'New mentor assignment' : `${count} new mentor assignments`}
-
-
-
${name ? `Hi ${escapeHtml(name)},` : 'Hi there,'}
- ${customNoteHtml}
-
${count === 1 ? 'You have been assigned as a mentor to a new project:' : `You have been assigned as a mentor to ${count} new projects:`}
-
- ${instructionsHtml}
-
- Open Mentor Dashboard
-
-
-
- Monaco Ocean Protection Challenge
-
-
-
-
- `.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 ${count} new projects:`)}
+
+ ${instructionsHtml}
+ ${ctaButton(mentorDashboardUrl, 'Open Mentor Dashboard')}
+ `
+
+ const html = getEmailWrapper(content)
return { subject, text, html }
}