File tree Expand file tree Collapse file tree 10 files changed +25
-18
lines changed
public/email/images_no-svgs Expand file tree Collapse file tree 10 files changed +25
-18
lines changed Original file line number Diff line number Diff line change 44 <link rel =" stylesheet" type =" text/css" href =" email/style.css" />
55 </head >
66
7- <body class =" font" >
7+ <body style =" background: white; width: 600px; min-height: 80vh; font-family: 'Nunito';
8+ font-style: normal" >
89 {{> header }}
910
1011 {{> bills }}
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export const registerHelpers = () => {
1010 handlebars . registerHelper ( "addCounts" , helpers . addCounts )
1111 handlebars . registerHelper ( "ifGreaterThan" , helpers . ifGreaterThan )
1212 handlebars . registerHelper ( "isDefined" , helpers . isDefined )
13+ handlebars . registerHelper ( "formatDate" , helpers . formatDate )
1314 handlebars . registerHelper ( "minusFour" , helpers . minusFour )
1415 handlebars . registerHelper ( "noUpdatesFormat" , helpers . noUpdatesFormat )
1516 handlebars . registerHelper ( "toLowerCase" , helpers . toLowerCase )
Original file line number Diff line number Diff line change @@ -22,6 +22,12 @@ export function isDefined(v: unknown) {
2222 return v !== undefined
2323}
2424
25+ export function formatDate ( timestamp : Date ) {
26+ const date = new Date ( timestamp )
27+
28+ return date . toLocaleDateString ( )
29+ }
30+
2531export function minusFour ( value : number ) {
2632 const result = value - 4
2733 return result
Original file line number Diff line number Diff line change 11<section style =" margin-left: 47.5px; margin-right: 47.5px; padding-bottom: 20px" >
22 <div style =" margin-bottom: 20px;" >
3- <h5 style =" display: inline-block; font-weight: 600; font-size: 25px; line-height: 125%; margin-right: 20px ; margin-bottom: 0px;
3+ <h5 style =" display: inline-block; font-weight: 600; font-size: 25px; line-height: 125%; margin-right: 30px ; margin-bottom: 0px;
44 color: #C71E32;" >
55 Bills
66 </h5 >
Original file line number Diff line number Diff line change 1- <footer style =" margin: 20px 47.5px 0 47.5px " >
1+ <footer style =" width: 600px " >
22 <hr style =" height: 3px; border-width: 0; color: #101010; background-color: #101010" >
33 <p style =" font-weight: 600; font-size: 12px; line-height: 125%; letter-spacing: 0.03em;
44 color: #000000; margin-top: 36px" >
Original file line number Diff line number Diff line change 11<div id =" logo" style =" background-color: #1a3185; padding: 16px 20px 16px 50px" >
2- <img src =" email\images_no-svgs\Logo.png" alt =" Maple Logo" />
3- {{!-- On prod, replace with: --}}
4- {{!-- <img src="https://mapletestimony.org/email/images_no-svgs/Logo.png" alt="Maple Logo" /> --}}
2+ <img src =" https://mapletestimony.org/email/images_no-svgs/Logo.png" alt =" Maple Logo" />
53</div >
64
75<header style =" background-color: #FFFFFF; padding: 24px 0px 12px;
1614 of the Bills and Users you follow!
1715 </h2 >
1816 <p class =" subheadline blue center" style =" font-weight: 600; font-size: 12px; line-height: 125%;
19- color: #1a3185; display: block; margin: auto; width: 30%; " >
20- {{ startDate }} - {{ endDate }}
17+ color: #1a3185; display: block; margin: auto; width: 30%" >
18+ {{ formatDate startDate }} - {{ formatDate endDate }}
2119 </p >
2220 </div >
23- <img src =" email\images_no-svgs\Mail Report.png" alt =" Report" style =" display: block; margin: auto; width: 32%;" />
24- {{!-- On prod, replace with: --}}
25- {{!-- <img src="https://mapletestimony.org/email/images_no-svgs/Mail Report.png" alt="Report" style="display: block; margin: auto; width: 32%;" /> --}}
21+ <img src =" https://mapletestimony.org/email/images_no-svgs/Mail Report.png" alt =" Report" style =" display: block; margin: auto; width: 32%" />
2622</header >
Original file line number Diff line number Diff line change 1- <nav style =" background-color: #1a3185; color: #FFFFFF" >
1+ <div id = " nav" style =" background-color: #1a3185; color: #FFFFFF; width: 600px " >
22 <div style =" display: block; margin: auto; width: 43%" >
33 <p style =" display: inline-block; font-weight: 500; font-size: 16px; line-height: 125%;
4- letter-spacing: 0.015em; margin-right: 4px; margin-bottom: 0px; "
4+ letter-spacing: 0.015em; margin-right: 4px; margin-bottom: 0px"
55 >
66 see more at your
77 </p >
1818 </a >
1919 </p >
2020 </div >
21- </nav >
21+ </div >
Original file line number Diff line number Diff line change 1- <div class = " noUpdatesIcon " >
2- <img src =" / empty mail.svg " alt =" Empty Mail" />
1+ <div style = " padding-top: 12px; padding-bottom: 20px; display: block; margin: auto; width: 65% " >
2+ <img src =" https://mapletestimony.org/email/images_no-svgs/ empty- mail.png " alt =" Empty Mail" />
33</div >
4- <h5 class =" noUpdatesTitle" >No updates for
4+ <h5 style =" font-weight: 600; font-size: 25px; line-height: 125%; margin-bottom: 0px;
5+ display: block; margin: auto; width: 65%; color: #000000"
6+ >No updates for
57 {{ noUpdatesFormat notificationFrequency }} !
68</h5 >
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ const EMAIL_TEMPLATE_PATH = "./functions/src/email/digestEmail.handlebars"
2222handlebars . registerHelper ( "addCounts" , helpers . addCounts )
2323handlebars . registerHelper ( "ifGreaterThan" , helpers . ifGreaterThan )
2424handlebars . registerHelper ( "isDefined" , helpers . isDefined )
25+ handlebars . registerHelper ( "formatDate" , helpers . formatDate )
2526handlebars . registerHelper ( "minusFour" , helpers . minusFour )
2627handlebars . registerHelper ( "noUpdatesFormat" , helpers . noUpdatesFormat )
2728handlebars . registerHelper ( "toLowerCase" , helpers . toLowerCase )
@@ -61,7 +62,7 @@ const renderToHtmlString = (digestData: NotificationEmailDigest) => {
6162 "utf8"
6263 )
6364 const compiledTemplate = handlebars . compile ( templateSource )
64- return compiledTemplate ( { digestData } )
65+ return compiledTemplate ( digestData )
6566}
6667
6768// Summary of Bills
You can’t perform that action at this time.
0 commit comments