-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
69 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
services/API-service/src/api/notification/email/mjml/footer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { | ||
COLOR_PRIMARY, | ||
COLOR_WHITE, | ||
getImageElement, | ||
getReturnElement, | ||
getTextElement, | ||
} from '../../helpers/mjml.helper'; | ||
|
||
export const getMjmlFooter = ({ | ||
ibfLogo, | ||
countryName, | ||
}: { | ||
ibfLogo: string; | ||
countryName: string; | ||
}): object => { | ||
const logoElement = getImageElement({ | ||
src: ibfLogo, | ||
otherAttributes: { width: '45px' }, | ||
}); | ||
|
||
const textElement = getTextElement({ | ||
content: `Impact-Based Forecasting Portal (IBF) was co-developed by Netherlands | ||
Red Cross 510 the together with the ${countryName} Red Cross | ||
National Society. For questions contact us at [email protected]`, | ||
attributes: { color: COLOR_WHITE }, | ||
}); | ||
|
||
const twoColumnSectionElement = { | ||
tagName: 'mj-section', | ||
children: [ | ||
{ | ||
tagName: 'mj-column', | ||
children: [logoElement], | ||
attributes: { width: '20%' }, | ||
}, | ||
{ | ||
tagName: 'mj-column', | ||
children: [textElement], | ||
attributes: { width: '80%' }, | ||
}, | ||
], | ||
}; | ||
return getReturnElement({ | ||
childrenEls: [twoColumnSectionElement], | ||
attributes: { 'background-color': COLOR_PRIMARY }, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters