From 1cd354ff17dceab55808d23e9101d23bda7b7f66 Mon Sep 17 00:00:00 2001 From: Alina Beck Date: Wed, 11 Sep 2019 12:51:27 +0100 Subject: [PATCH] paste html template from TedGoas/Cerberus --- .../middleware/email/templates/signup.html | 434 ++++++++++++++++++ .../src/middleware/email/templates/signup.js | 4 +- 2 files changed, 437 insertions(+), 1 deletion(-) create mode 100644 backend/src/middleware/email/templates/signup.html diff --git a/backend/src/middleware/email/templates/signup.html b/backend/src/middleware/email/templates/signup.html new file mode 100644 index 000000000..7316dc841 --- /dev/null +++ b/backend/src/middleware/email/templates/signup.html @@ -0,0 +1,434 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ (Optional) This text will appear in the inbox preview, but not the email body. It can be used to supplement the + email subject line or even summarize the email's contents. Extended text preheaders (~490 characters) seems like a + better UX for anyone using a screenreader or voice-command apps like Siri to dictate the contents of an email. If + this text is not included, email clients will automatically populate it using the text (including image alt text) + at the start of the email's body. +
+ + + + +
+ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌  +
+ + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/backend/src/middleware/email/templates/signup.js b/backend/src/middleware/email/templates/signup.js index 25f3681d7..a83e59d5b 100644 --- a/backend/src/middleware/email/templates/signup.js +++ b/backend/src/middleware/email/templates/signup.js @@ -4,6 +4,7 @@ import path from 'path' import mustache from 'mustache' const signupText = fs.readFileSync(path.join(__dirname, './signup.txt'), 'utf-8') +const signupHtml = fs.readFileSync(path.join(__dirname, './signup.html'), 'utf-8') export const signupTemplate = options => { const { @@ -21,6 +22,7 @@ export const signupTemplate = options => { return { to: email, subject, - text: mustache.render(signupText, { actionUrl, nonce, supportUrl }) + text: mustache.render(signupText, { actionUrl, nonce, supportUrl }), + html: mustache.render(signupHtml, {}), } }