AV: recolor email templates (blue palette inside template literals + NAB/IBC marketing phrasing → AV palette + InfoComm/ISE)
This commit is contained in:
@@ -19,7 +19,7 @@ export async function POST(request: NextRequest) {
|
|||||||
html: `
|
html: `
|
||||||
<div style="font-family:Arial,sans-serif;max-width:600px;background:#0a0a0a;color:#e5e5e5;padding:32px;border-radius:8px;">
|
<div style="font-family:Arial,sans-serif;max-width:600px;background:#0a0a0a;color:#e5e5e5;padding:32px;border-radius:8px;">
|
||||||
<div style="margin-bottom:24px;">
|
<div style="margin-bottom:24px;">
|
||||||
<h1 style="color:#3b82f6;font-size:20px;margin:0 0 4px;">Relevant Media Properties</h1>
|
<h1 style="color:#F0A623;font-size:20px;margin:0 0 4px;">Relevant Media Properties</h1>
|
||||||
<p style="color:#555;font-size:12px;margin:0;">AV Beat · AV Beat — Company Story Engine</p>
|
<p style="color:#555;font-size:12px;margin:0;">AV Beat · AV Beat — Company Story Engine</p>
|
||||||
</div>
|
</div>
|
||||||
<h2 style="font-size:18px;color:#fff;margin:0 0 12px;">New Company Stories Queued for Review</h2>
|
<h2 style="font-size:18px;color:#fff;margin:0 0 12px;">New Company Stories Queued for Review</h2>
|
||||||
@@ -32,11 +32,11 @@ export async function POST(request: NextRequest) {
|
|||||||
${moreText}
|
${moreText}
|
||||||
</div>
|
</div>
|
||||||
<a href="${process.env.NEXT_PUBLIC_SITE_URL || 'https://avbeat.com'}/admin/company-tracker"
|
<a href="${process.env.NEXT_PUBLIC_SITE_URL || 'https://avbeat.com'}/admin/company-tracker"
|
||||||
style="display:inline-block;background:#3b82f6;color:#fff;text-decoration:none;padding:10px 20px;border-radius:6px;font-size:14px;font-weight:bold;">
|
style="display:inline-block;background:#F0A623;color:#fff;text-decoration:none;padding:10px 20px;border-radius:6px;font-size:14px;font-weight:bold;">
|
||||||
Review Story Queue →
|
Review Story Queue →
|
||||||
</a>
|
</a>
|
||||||
<p style="color:#444;font-size:12px;margin-top:24px;">
|
<p style="color:#444;font-size:12px;margin-top:24px;">
|
||||||
Manage settings at <a href="${process.env.NEXT_PUBLIC_SITE_URL || 'https://avbeat.com'}/admin/company-tracker" style="color:#3b82f6;">Company Tracker</a>
|
Manage settings at <a href="${process.env.NEXT_PUBLIC_SITE_URL || 'https://avbeat.com'}/admin/company-tracker" style="color:#F0A623;">Company Tracker</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export async function POST(req: NextRequest) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const noteHtml = note
|
const noteHtml = note
|
||||||
? `<div style="background:#1a1a1a;border-left:3px solid #3b82f6;padding:12px 16px;margin-bottom:20px;border-radius:2px;">
|
? `<div style="background:#1a1a1a;border-left:3px solid #F0A623;padding:12px 16px;margin-bottom:20px;border-radius:2px;">
|
||||||
<p style="margin:0;color:#aaa;font-size:14px;font-style:italic;">"${note}"</p>
|
<p style="margin:0;color:#aaa;font-size:14px;font-style:italic;">"${note}"</p>
|
||||||
</div>`
|
</div>`
|
||||||
: "";
|
: "";
|
||||||
@@ -45,7 +45,7 @@ export async function POST(req: NextRequest) {
|
|||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<tr>
|
<tr>
|
||||||
<td style="background:#0a0a0a;border-bottom:1px solid #1a1a1a;padding:20px 28px;">
|
<td style="background:#0a0a0a;border-bottom:1px solid #1a1a1a;padding:20px 28px;">
|
||||||
<p style="margin:0;color:#3b82f6;font-size:11px;font-weight:700;letter-spacing:3px;text-transform:uppercase;">AV Beat</p>
|
<p style="margin:0;color:#F0A623;font-size:11px;font-weight:700;letter-spacing:3px;text-transform:uppercase;">AV Beat</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- Body -->
|
<!-- Body -->
|
||||||
@@ -53,10 +53,10 @@ export async function POST(req: NextRequest) {
|
|||||||
<td style="padding:28px;">
|
<td style="padding:28px;">
|
||||||
<p style="margin:0 0 8px;color:#555;font-size:11px;text-transform:uppercase;letter-spacing:2px;">Someone shared an article with you</p>
|
<p style="margin:0 0 8px;color:#555;font-size:11px;text-transform:uppercase;letter-spacing:2px;">Someone shared an article with you</p>
|
||||||
${noteHtml}
|
${noteHtml}
|
||||||
<p style="margin:0 0 6px;color:#3b82f6;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:2px;">NEWS</p>
|
<p style="margin:0 0 6px;color:#F0A623;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:2px;">NEWS</p>
|
||||||
<h1 style="margin:0 0 12px;color:#f0f0f0;font-size:22px;font-weight:700;line-height:1.3;">${articleTitle}</h1>
|
<h1 style="margin:0 0 12px;color:#f0f0f0;font-size:22px;font-weight:700;line-height:1.3;">${articleTitle}</h1>
|
||||||
<p style="margin:0 0 24px;color:#999;font-size:14px;line-height:1.6;">${articleExcerpt}</p>
|
<p style="margin:0 0 24px;color:#999;font-size:14px;line-height:1.6;">${articleExcerpt}</p>
|
||||||
<a href="${articleUrl}" style="display:inline-block;background:#3b82f6;color:#fff;text-decoration:none;font-size:13px;font-weight:700;padding:12px 24px;border-radius:2px;letter-spacing:1px;text-transform:uppercase;">Read Article</a>
|
<a href="${articleUrl}" style="display:inline-block;background:#F0A623;color:#fff;text-decoration:none;font-size:13px;font-weight:700;padding:12px 24px;border-radius:2px;letter-spacing:1px;text-transform:uppercase;">Read Article</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ async function sendWelcome(email: string, topics?: string[]) {
|
|||||||
|
|
||||||
const topicsBlock =
|
const topicsBlock =
|
||||||
topics && topics.length > 0
|
topics && topics.length > 0
|
||||||
? `<p style="color:#aaa;font-size:14px;line-height:1.5;margin:14px 0 0;">You'll receive coverage on: <strong style="color:#3b82f6;">${topics.join(', ')}</strong></p>`
|
? `<p style="color:#aaa;font-size:14px;line-height:1.5;margin:14px 0 0;">You'll receive coverage on: <strong style="color:#F0A623;">${topics.join(', ')}</strong></p>`
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
await transporter.sendMail({
|
await transporter.sendMail({
|
||||||
@@ -96,24 +96,24 @@ async function sendWelcome(email: string, topics?: string[]) {
|
|||||||
html: `
|
html: `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title>Welcome to AV Beat</title></head>
|
<html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title>Welcome to AV Beat</title></head>
|
||||||
<body style="margin:0;padding:0;background:#0a0e15;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;">
|
<body style="margin:0;padding:0;background:#1c1815;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;">
|
||||||
<table role="presentation" cellpadding="0" cellspacing="0" width="100%" style="background:#0a0e15;padding:40px 16px;">
|
<table role="presentation" cellpadding="0" cellspacing="0" width="100%" style="background:#1c1815;padding:40px 16px;">
|
||||||
<tr><td align="center">
|
<tr><td align="center">
|
||||||
<table role="presentation" cellpadding="0" cellspacing="0" width="600" style="max-width:600px;background:#11192a;border:1px solid #1e3a5f;border-radius:10px;overflow:hidden;">
|
<table role="presentation" cellpadding="0" cellspacing="0" width="600" style="max-width:600px;background:#231d18;border:1px solid #3a322b;border-radius:10px;overflow:hidden;">
|
||||||
<tr><td style="padding:32px 36px 8px;">
|
<tr><td style="padding:32px 36px 8px;">
|
||||||
<div style="font-family:'Courier New',monospace;font-size:10px;font-weight:700;letter-spacing:0.22em;text-transform:uppercase;color:#3b82f6;">AV Beat Newsletter</div>
|
<div style="font-family:'Courier New',monospace;font-size:10px;font-weight:700;letter-spacing:0.22em;text-transform:uppercase;color:#F0A623;">AV Beat Newsletter</div>
|
||||||
<h1 style="margin:14px 0 8px;font-size:24px;line-height:1.2;color:#ffffff;font-weight:800;">You're in</h1>
|
<h1 style="margin:14px 0 8px;font-size:24px;line-height:1.2;color:#ffffff;font-weight:800;">You're in</h1>
|
||||||
<p style="margin:0;color:#cfd6e1;font-size:15px;line-height:1.55;">Thanks for subscribing to <strong style="color:#ffffff;">AV Beat</strong> — the digital platform for pro AV, live production, and display tech professionals.</p>
|
<p style="margin:0;color:#FBEFE0;font-size:15px;line-height:1.55;">Thanks for subscribing to <strong style="color:#ffffff;">AV Beat</strong> — the digital platform for pro AV, live production, and display tech professionals.</p>
|
||||||
${topicsBlock}
|
${topicsBlock}
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td style="padding:18px 36px 8px;">
|
<tr><td style="padding:18px 36px 8px;">
|
||||||
<p style="margin:0;color:#98a3b3;font-size:14px;line-height:1.6;">You'll get one editorial dispatch a week — industry news, product launches, NAB/IBC coverage, and deep-dives. No spam, no sales calls.</p>
|
<p style="margin:0;color:#C9BBA8;font-size:14px;line-height:1.6;">You'll get one editorial dispatch a week — industry news, product launches, InfoComm/ISE coverage, and deep-dives. No spam, no sales calls.</p>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td style="padding:18px 36px 26px;" align="center">
|
<tr><td style="padding:18px 36px 26px;" align="center">
|
||||||
<a href="${siteUrl}/news" style="display:inline-block;background:#3b82f6;color:#ffffff;text-decoration:none;padding:11px 22px;border-radius:6px;font-weight:700;font-size:13px;letter-spacing:0.05em;text-transform:uppercase;">Browse Industry News</a>
|
<a href="${siteUrl}/news" style="display:inline-block;background:#F0A623;color:#ffffff;text-decoration:none;padding:11px 22px;border-radius:6px;font-weight:700;font-size:13px;letter-spacing:0.05em;text-transform:uppercase;">Browse AV Industry News</a>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td style="padding:18px 36px 28px;border-top:1px solid #1e3a5f;">
|
<tr><td style="padding:18px 36px 28px;border-top:1px solid #3a322b;">
|
||||||
<p style="margin:0;color:#5a6470;font-size:11px;line-height:1.5;">You're receiving this because you signed up at <a href="${siteUrl}" style="color:#3b82f6;text-decoration:none;">avbeat.com</a>. <a href="${siteUrl}/unsubscribe?email=${encodeURIComponent(email)}" style="color:#98a3b3;">Unsubscribe anytime</a>.</p>
|
<p style="margin:0;color:#8a7e6e;font-size:11px;line-height:1.5;">You're receiving this because you signed up at <a href="${siteUrl}" style="color:#F0A623;text-decoration:none;">avbeat.com</a>. <a href="${siteUrl}/unsubscribe?email=${encodeURIComponent(email)}" style="color:#C9BBA8;">Unsubscribe anytime</a>.</p>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|||||||
@@ -124,37 +124,37 @@ export async function POST(req: NextRequest) {
|
|||||||
const articlesHtml = articles
|
const articlesHtml = articles
|
||||||
.map(
|
.map(
|
||||||
(a: { title: string; excerpt?: string; url?: string; image?: string; category?: string }) => `
|
(a: { title: string; excerpt?: string; url?: string; image?: string; category?: string }) => `
|
||||||
<div style="border-bottom:1px solid #1e3a5f;padding:20px 0;">
|
<div style="border-bottom:1px solid #3a322b;padding:20px 0;">
|
||||||
${a.category ? `<span style="color:#3b82f6;font-size:11px;font-weight:bold;text-transform:uppercase;letter-spacing:1px;">${a.category}</span>` : ''}
|
${a.category ? `<span style="color:#F0A623;font-size:11px;font-weight:bold;text-transform:uppercase;letter-spacing:1px;">${a.category}</span>` : ''}
|
||||||
<h2 style="color:#e0e0e0;font-size:18px;margin:8px 0 6px;">
|
<h2 style="color:#e0e0e0;font-size:18px;margin:8px 0 6px;">
|
||||||
${a.url ? `<a href="${siteUrl}${a.url}" style="color:#e0e0e0;text-decoration:none;">${a.title}</a>` : a.title}
|
${a.url ? `<a href="${siteUrl}${a.url}" style="color:#e0e0e0;text-decoration:none;">${a.title}</a>` : a.title}
|
||||||
</h2>
|
</h2>
|
||||||
${a.excerpt ? `<p style="color:#888;font-size:14px;margin:0 0 10px;">${a.excerpt}</p>` : ''}
|
${a.excerpt ? `<p style="color:#888;font-size:14px;margin:0 0 10px;">${a.excerpt}</p>` : ''}
|
||||||
${a.url ? `<a href="${siteUrl}${a.url}" style="color:#3b82f6;font-size:13px;text-decoration:none;">Read more →</a>` : ''}
|
${a.url ? `<a href="${siteUrl}${a.url}" style="color:#F0A623;font-size:13px;text-decoration:none;">Read more →</a>` : ''}
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
.join('');
|
.join('');
|
||||||
|
|
||||||
const emailHtml = `
|
const emailHtml = `
|
||||||
<div style="background:#0d1520;padding:0;font-family:sans-serif;max-width:600px;margin:0 auto;">
|
<div style="background:#1c1815;padding:0;font-family:sans-serif;max-width:600px;margin:0 auto;">
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<div style="background:#111;border-bottom:2px solid #3b82f6;padding:24px 32px;">
|
<div style="background:#111;border-bottom:2px solid #F0A623;padding:24px 32px;">
|
||||||
<h1 style="color:#3b82f6;font-size:22px;margin:0;font-weight:bold;">AV Beat</h1>
|
<h1 style="color:#F0A623;font-size:22px;margin:0;font-weight:bold;">AV Beat</h1>
|
||||||
<p style="color:#555;font-size:12px;margin:4px 0 0;">News & Intelligence for Pro AV, Live Production & Display Tech</p>
|
<p style="color:#555;font-size:12px;margin:4px 0 0;">News & Intelligence for Pro AV, Live Production & Display Tech</p>
|
||||||
</div>
|
</div>
|
||||||
<!-- Body -->
|
<!-- Body -->
|
||||||
<div style="padding:32px;">
|
<div style="padding:32px;">
|
||||||
${previewText ? `<p style="color:#aaa;font-size:15px;margin:0 0 24px;">${previewText}</p>` : ''}
|
${previewText ? `<p style="color:#aaa;font-size:15px;margin:0 0 24px;">${previewText}</p>` : ''}
|
||||||
${customMessage ? `<div style="background:#1a2535;border-left:3px solid #3b82f6;padding:16px;margin-bottom:24px;"><p style="color:#e0e0e0;font-size:14px;margin:0;">${customMessage}</p></div>` : ''}
|
${customMessage ? `<div style="background:#231d18;border-left:3px solid #F0A623;padding:16px;margin-bottom:24px;"><p style="color:#e0e0e0;font-size:14px;margin:0;">${customMessage}</p></div>` : ''}
|
||||||
${articlesHtml}
|
${articlesHtml}
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<div style="background:#0a0f1a;padding:24px 32px;border-top:1px solid #1e3a5f;">
|
<div style="background:#1c1815;padding:24px 32px;border-top:1px solid #3a322b;">
|
||||||
<p style="color:#555;font-size:12px;margin:0;">You're receiving this because you subscribed at avbeat.com.</p>
|
<p style="color:#555;font-size:12px;margin:0;">You're receiving this because you subscribed at avbeat.com.</p>
|
||||||
<p style="color:#555;font-size:12px;margin:8px 0 0;">
|
<p style="color:#555;font-size:12px;margin:8px 0 0;">
|
||||||
<a href="${siteUrl}" style="color:#3b82f6;">Visit AV Beat</a> ·
|
<a href="${siteUrl}" style="color:#F0A623;">Visit AV Beat</a> ·
|
||||||
<a href="${siteUrl}/unsubscribe?email={{email}}" style="color:#3b82f6;">Unsubscribe</a>
|
<a href="${siteUrl}/unsubscribe?email={{email}}" style="color:#F0A623;">Unsubscribe</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user