Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions built-email-templates/weeklyDigest.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<!--
START_CONFIG
{
Expand All @@ -13,7 +14,6 @@
}
END_CONFIG
-->
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Expand Down Expand Up @@ -121,7 +121,7 @@ <h3 style="color:#16171A; font-size:16px; font-weight:500; margin-top:0; text-al
</tr>
{{/data.hasOverflowThreads}}

{{#data.communities}}
{{#if data.communities}}
<tr>
<td style="word-break:break-word">
<div class="section-divider" style="border-bottom:1px solid #DAE4F2; display:block; height:1px; margin:32px 0" height="1"></div>
Expand All @@ -133,7 +133,7 @@ <h3 style="color:#16171A; font-size:16px; font-weight:500; margin-top:0; text-al
<h2 class="discover-divider" style="color:#16171A; font-size:20px; font-weight:bold; margin-top:0; text-align:left; margin-bottom:0" align="left">Discover more communities:</h2>
</td>
</tr>
{{/data.communities}}
{{/if}}

{{#each data.communities}}
<tr>
Expand Down
9 changes: 8 additions & 1 deletion email-template-scripts/sendgrid-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,14 @@ const processPath = path => {
.slice(configStart, configEnd)
.replace('START_CONFIG', '')
.replace(/(\r\n\t|\n|\r\t)/gm, '');
const config = JSON.parse(configString);

let config;
try {
config = JSON.parse(configString);
} catch (err) {
console.error({ err, configString, file, configStart, configEnd });
return;
}

if (!UPDATE_PROD_TEMPLATES && !config.test) {
console.error('🔅 No test config for this template, skipping');
Expand Down
20 changes: 12 additions & 8 deletions email-templates/weeklyDigest.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<!--
START_CONFIG
Expand All @@ -15,8 +18,6 @@
END_CONFIG
-->

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Expand Down Expand Up @@ -440,7 +441,8 @@ <h3>{{content.title}}</h3>

<td valign="middle">
<p>
Posted in <a href="https://spectrum.chat/{{community.slug}}">{{community.name}}</a>&nbsp;·&nbsp;<a
Posted in <a
href="https://spectrum.chat/{{community.slug}}">{{community.name}}</a>&nbsp;·&nbsp;<a
href="https://spectrum.chat/{{community.slug}}/{{channel.slug}}">{{channel.name}}</a>
</p>
<p>
Expand Down Expand Up @@ -470,7 +472,7 @@ <h3>{{content.title}}</h3>
</tr>
{{/data.hasOverflowThreads}}

{{#data.communities}}
{{#if data.communities}}
<tr>
<td>
<div class="section-divider"></div>
Expand All @@ -482,12 +484,13 @@ <h3>{{content.title}}</h3>
<h2 class="discover-divider">Discover more communities:</h2>
</td>
</tr>
{{/data.communities}}
{{/if}}

{{#each data.communities}}
<tr>
<td>
<table width="100%" cellpadding="0" cellspacing="0" class="thread-community-header suggested-community">
<table width="100%" cellpadding="0" cellspacing="0"
class="thread-community-header suggested-community">
<tr width="100%" cellpadding="0" cellspacing="0">
<td valign="middle" width="32">
<a href="https://spectrum.chat/{{slug}}" class="block">
Expand Down Expand Up @@ -556,7 +559,8 @@ <h2 class="suggested-community-title">{{name}}</h2>
</li>

<li>
<a href="https://spectrum.chat/spectrum/hugs-n-bugs">Report bugs</a> · <a href="https://spectrum.chat/spectrum/feature-requests">Request
<a href="https://spectrum.chat/spectrum/hugs-n-bugs">Report bugs</a> · <a
href="https://spectrum.chat/spectrum/feature-requests">Request
a feature</a>
</li>
</ul>
Expand Down