Skip to content

Commit 35d60a2

Browse files
committed
fix(email): Update notification email styles - increase font-size and re-size columns for User Bills, center header text. Also fixes the test email script to accomodate the new pluralize helper
1 parent a31fef3 commit 35d60a2

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

functions/src/email/partials/header.handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</div>
44

55
<header style="background-color: #FFFFFF; padding: 24px 0px 12px;
6-
gap: 16px">
6+
gap: 16px; text-align: center;">
77
<div>
88
<h2 style="font-weight: 700; font-size: 31px; line-height: 125%; margin: auto; width: 70%; color: #1a3185">
99
Here is your

functions/src/email/partials/users/user.handlebars

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
{{/ifGreaterThan}}
2525
</div>
2626
</div>
27-
<table style="display: inline-block; margin: 0; padding: 0">
27+
<table style="display: inline-block; margin: 0; padding: 0; font-size: 20px;">
2828
<tr>
2929
{{!-- the possibility of the 6th item being handled differently and
3030
the possibility of more than 6 data points makes iterating
@@ -33,14 +33,14 @@
3333
{{!-- Item 1 --}}
3434

3535
{{#if this.bills.0.billId}}
36-
<td style="width: 75px">
36+
<td style="width: 100px">
3737
<div style="text-decoration-line: underline; display: inline-block; margin-right: 15px">
3838
<a href="https://mapletestimony.org/bills/{{this.bills.0.court}}/{{this.bills.0.billId}}" target="_blank" rel="noopener noreferrer" style="color: inherit">
3939
{{this.bills.0.billId}}
4040
</a>
4141
</div>
4242
</td>
43-
<td style="width: 75px">
43+
<td style="width: 50px">
4444
<img
4545
src="https://mapletestimony.org/email/images_no-svgs/{{this.bills.0.position}}.jpg"
4646
/>
@@ -50,14 +50,14 @@
5050
{{!-- Item 2 --}}
5151

5252
{{#if this.bills.1.billId}}
53-
<td style="width: 75px">
53+
<td style="width: 100px">
5454
<div style="text-decoration-line: underline; display: inline-block; margin-right: 15px">
5555
<a href="https://mapletestimony.org/bills/{{this.bills.1.court}}/{{this.bills.1.billId}}" target="_blank" rel="noopener noreferrer" style="color: inherit">
5656
{{this.bills.1.billId}}
5757
</a>
5858
</div>
5959
</td>
60-
<td style="width: 75px">
60+
<td style="width: 50px">
6161
<img
6262
src="https://mapletestimony.org/email/images_no-svgs/{{this.bills.1.position}}.jpg"
6363
/>
@@ -68,14 +68,14 @@
6868
{{!-- Item 3 --}}
6969

7070
{{#if this.bills.2.billId}}
71-
<td style="width: 75px">
71+
<td style="width: 100px">
7272
<div style="text-decoration-line: underline; display: inline-block; margin-right: 15px">
7373
<a href="https://mapletestimony.org/bills/{{this.bills.2.court}}/{{this.bills.2.billId}}" target="_blank" rel="noopener noreferrer" style="color: inherit">
7474
{{this.bills.2.billId}}
7575
</a>
7676
</div>
7777
</td>
78-
<td style="width: 75px">
78+
<td style="width: 50px">
7979
<img
8080
src="https://mapletestimony.org/email/images_no-svgs/{{this.bills.2.position}}.jpg"
8181
/>
@@ -85,14 +85,14 @@
8585
{{!-- Item 4 --}}
8686

8787
{{#if this.bills.3.billId}}
88-
<td style="width: 75px">
88+
<td style="width: 100px">
8989
<div style="text-decoration-line: underline; display: inline-block; margin-right: 15px">
9090
<a href="https://mapletestimony.org/bills/{{this.bills.3.court}}/{{this.bills.3.billId}}" target="_blank" rel="noopener noreferrer" style="color: inherit">
9191
{{this.bills.3.billId}}
9292
</a>
9393
</div>
9494
</td>
95-
<td style="width: 75px">
95+
<td style="width: 50px">
9696
<img
9797
src="https://mapletestimony.org/email/images_no-svgs/{{this.bills.3.position}}.jpg"
9898
/>
@@ -104,14 +104,14 @@
104104
{{!-- Item 5 --}}
105105

106106
{{#if this.bills.4.billId}}
107-
<td style="width: 75px">
107+
<td style="width: 100px">
108108
<div style="text-decoration-line: underline; display: inline-block; margin-right: 15px">
109109
<a href="https://mapletestimony.org/bills/{{this.bills.4.court}}/{{this.bills.4.billId}}" target="_blank" rel="noopener noreferrer" style="color: inherit">
110110
{{this.bills.4.billId}}
111111
</a>
112112
</div>
113113
</td>
114-
<td style="width: 75px">
114+
<td style="width: 50px">
115115
<img
116116
src="https://mapletestimony.org/email/images_no-svgs/{{this.bills.4.position}}.jpg"
117117
/>
@@ -122,25 +122,25 @@
122122

123123
{{#if this.bills.5.billId}}
124124
{{#if this.bills.6.billId}}
125-
<td style="width: 75px">
125+
<td style="width: 100px">
126126
<a class="orgItemText" href="https://mapletestimony.org/profile?id={{userId}}" target="_blank" rel="noopener noreferrer">
127127
see more
128128
</a>
129129
</td>
130-
<td style="width: 75px">
130+
<td style="width: 50px">
131131
<div style="color: #1A3185; font-weight: bold;">
132132
+
133133
</div>
134134
</td>
135135
{{else}}
136-
<td style="width: 75px">
136+
<td style="width: 100px">
137137
<div style="text-decoration-line: underline; display: inline-block; margin-right: 15px">
138138
<a href="https://mapletestimony.org/bills/{{this.bills.5.court}}/{{this.bills.5.billId}}" target="_blank" rel="noopener noreferrer" style="color: inherit">
139139
{{this.bills.5.billId}}
140140
</a>
141141
</div>
142142
</td>
143-
<td style="width: 75px">
143+
<td style="width: 50px">
144144
<img
145145
src="https://mapletestimony.org/email/images_no-svgs/{{this.bills.5.position}}.jpg"
146146
/>

scripts/firebase-admin/sendTestEmail.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ handlebars.registerHelper("formatDate", helpers.formatDate)
2626
handlebars.registerHelper("minusFour", helpers.minusFour)
2727
handlebars.registerHelper("noUpdatesFormat", helpers.noUpdatesFormat)
2828
handlebars.registerHelper("toLowerCase", helpers.toLowerCase)
29+
handlebars.registerHelper("pluralize", helpers.pluralize)
30+
2931
function registerPartials(directoryPath: string) {
3032
console.log("REGISTERING PARTIALS")
3133

0 commit comments

Comments
 (0)