+
+
+
+
+
+ {{{ if logo.src }}}
+
+ {{{ else }}}
+ {site_title}
+ {{{ end }}}
+ |
+
+
+ | |
+
+
+
diff --git a/email/partials/post-queue-body.html b/email/partials/post-queue-body.html
new file mode 100644
index 0000000..c95df5d
--- /dev/null
+++ b/email/partials/post-queue-body.html
@@ -0,0 +1,18 @@
+
[[post-queue:category]]
+
{category.name}
+
+ {{{ if topic.tid }}}[[post-queue:topic]]{{{ else }}}[[post-queue:title]]{{{
+ end }}}
+
+
+ {{{ if topic.url }}}{topic.title}{{{ else
+ }}}{topic.title}{{{ end }}}
+
+
[[post-queue:user]]
+
+ {{{ if user.url }}}{user.username}{{{ else
+ }}}{user.username}{{{ end }}}
+
+
{content}
diff --git a/email/registration_accepted.html b/email/registration_accepted.html
new file mode 100644
index 0000000..c21cd5a
--- /dev/null
+++ b/email/registration_accepted.html
@@ -0,0 +1,40 @@
+
+
+
[[email:registration_accepted.preheader]]
+
+
+
+
+
+
+
+
+[[email:welcome.text1, {site_title}]]
+ |
+
+
+
+[[email:welcome.text3]]
+ |
+
+
+|
+
+
+
+ |
+
+
+ |
+
+
+
+
diff --git a/email/reset.html b/email/reset.html
new file mode 100644
index 0000000..04c3244
--- /dev/null
+++ b/email/reset.html
@@ -0,0 +1,45 @@
+
+
+
[[email:reset.preheader]]
+
+
+
+
+
+
+
+
+[[email:greeting-no-name]]
+ |
+
+
+
+[[email:reset.text1]]
+ |
+
+
+|
+ [[email:reset.text2]]
+ |
+
+
+|
+
+
+
+ |
+
+
+ |
+
+
+
+
diff --git a/email/reset_notify.html b/email/reset_notify.html
new file mode 100644
index 0000000..29e09fe
--- /dev/null
+++ b/email/reset_notify.html
@@ -0,0 +1,30 @@
+
+
+
[[email:reset_notify.preheader]]
+
+
+
+
+
+
+
+
+[[email:greeting-with-name, {username}]]
+ |
+
+
+
+[[email:reset.notify.text1, {date}]]
+ |
+
+
+|
+ [[email:reset.notify.text2]]
+ |
+
+
+ |
+
+
+
+
diff --git a/email/test.html b/email/test.html
new file mode 100644
index 0000000..34ac544
--- /dev/null
+++ b/email/test.html
@@ -0,0 +1,25 @@
+
+
+
[[email:test.preheader]]
+
+
+
+
+
+
+
+
+[[email:greeting-no-name]]
+ |
+
+
+
+[[email:test.text1]]
+ |
+
+
+ |
+
+
+
+
diff --git a/email/verify-email.html b/email/verify-email.html
new file mode 100644
index 0000000..a587ebf
--- /dev/null
+++ b/email/verify-email.html
@@ -0,0 +1,50 @@
+
+
+
[[email:verify-email.preheader]]
+
+
+
+
+
+
+
+
+[[email:greeting-with-name, {username}]]
+ |
+
+
+
+[[email:email.verify.text1]]
+ |
+
+
+|
+ [[email:email.verify.text2]]
+ |
+
+
+|
+ [[email:email.verify.text3, {email}]]
+ |
+
+
+|
+
+
+
+ |
+
+
+ |
+
+
+
+
diff --git a/email/welcome.html b/email/welcome.html
new file mode 100644
index 0000000..4c468ac
--- /dev/null
+++ b/email/welcome.html
@@ -0,0 +1,50 @@
+
+
+
[[email:welcome.preheader]]
+
+
+
+
+
+
+
+
+[[email:greeting-with-name, {username}]]
+ |
+
+
+
+[[email:email.verify.text1]]
+ |
+
+
+|
+ [[email:email.verify.text2]]
+ |
+
+
+|
+ [[email:email.verify.text3, {email}]]
+ |
+
+
+|
+
+
+
+ |
+
+
+ |
+
+
+
+
diff --git a/languages/en-GB/email.json b/languages/en-GB/email.json
new file mode 100644
index 0000000..9eb4142
--- /dev/null
+++ b/languages/en-GB/email.json
@@ -0,0 +1,12 @@
+{
+ "reset.preheader": "Reset your Shadows Over Westgate password",
+ "welcome.preheader": "Confirm your email to enter Shadows Over Westgate",
+ "verify-email.preheader": "Confirm your new email address",
+ "reset_notify.preheader": "Your Shadows Over Westgate password was changed",
+ "registration_accepted.preheader": "Your Shadows Over Westgate account is approved",
+ "invitation.preheader": "You have been invited to Shadows Over Westgate",
+ "banned.preheader": "Your Shadows Over Westgate account status has changed",
+ "test.preheader": "Test email from Shadows Over Westgate",
+ "notification.preheader": "You have a new notification on Shadows Over Westgate",
+ "digest.preheader": "Your Shadows Over Westgate activity digest"
+}
diff --git a/plugin.json b/plugin.json
index 6ac8810..de939a1 100644
--- a/plugin.json
+++ b/plugin.json
@@ -12,6 +12,7 @@
],
"scripts": ["public/client.js", "../nodebb-theme-harmony/public/harmony.js"],
"templates": "templates",
+ "languages": "languages",
"modules": {
"../admin/plugins/theme-quickstart.js": "../nodebb-theme-harmony/public/admin.js",
"../client/account/theme.js": "../nodebb-theme-harmony/public/settings.js"
diff --git a/scripts/check-emails.js b/scripts/check-emails.js
new file mode 100644
index 0000000..5b6c589
--- /dev/null
+++ b/scripts/check-emails.js
@@ -0,0 +1,34 @@
+#!/usr/bin/env node
+// ponytail: 30-line structural guard, not a render test. Catches drift, not pixels.
+const fs = require('fs');
+const path = require('path');
+
+const dir = path.join(__dirname, '..', 'email');
+const files = fs.readdirSync(dir).filter((f) => f.endsWith('.html'));
+
+const failures = [];
+for (const f of files) {
+ const src = fs.readFileSync(path.join(dir, f), 'utf8');
+ const trimmed = src.trim();
+ const checks = [
+ [
+ trimmed.startsWith(''),
+ 'header IMPORT must be first',
+ ],
+ [
+ trimmed.endsWith(''),
+ 'footer IMPORT must be last',
+ ],
+ [//, 'missing preheader marker'],
+ ];
+ for (const [check, msg] of checks) {
+ if (check instanceof RegExp ? !check.test(src) : !check) failures.push(`${f}: ${msg}`);
+ }
+}
+
+if (failures.length) {
+ console.error('Email template check FAILED:\n' + failures.join('\n'));
+ process.exit(1);
+}
+
+console.log(`Email template check passed (${files.length} templates).`);