-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use mjml template instead of plain html
- Loading branch information
1 parent
1e3a0ac
commit 9d723f6
Showing
9 changed files
with
20,160 additions
and
136 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
div.counter { | ||
padding: 0; | ||
flex-grow: 0; | ||
text-align: center; | ||
background: #ffb93a; | ||
color: white; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const mailString = require('./mail-template.mjml'); | ||
const template = require('lodash/template') | ||
|
||
module.exports = ({ title, name }) => { | ||
return template(mailString)({ title, name }); | ||
} |
This file was deleted.
Oops, something went wrong.
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,39 @@ | ||
<mjml> | ||
<mj-head> | ||
<mj-title><%= title %></mj-title> | ||
|
||
<mj-attributes> | ||
<mj-class name="body-text" font-family="Open Sans, Arial, sans-serif" color="#111111" font-size="16px" line-height="26px" align="center"> | ||
</mj-class> | ||
</mj-attributes> | ||
|
||
<mj-font name="Open Sans" href="http://fonts.googleapis.com/css?family=Open+Sans"> | ||
</mj-font> | ||
</mj-head> | ||
|
||
<mj-body background-color="#ffffff" padding="0px"> | ||
<mj-section background-color="#f0f0f0"> | ||
<mj-column> | ||
<mj-text mj-class="body-text" font-size="20px">Hello, <%= name %>!</mj-text> | ||
<mj-text align="left" mj-class="body-text"> | ||
I hope you like my imaginary smoothie shop website. You can go back to the | ||
<a href="https://medium.com/@maciejmatu">article</a> if you'd like. Don't worry, you didn't actually order 500,000 smoothies. | ||
If you would like to contact me, feel free to reach out on | ||
<a target="_blank" rel="noopener" href="https://www.linkedin.com/in/maciej-matuszewski-5087a975/">linked.in</a>, | ||
<a target="_blank" rel="noopener" href="http://github.com/maciejmatu">github</a> or send me a message at | ||
<a href="mailto:[email protected]">[email protected]</a> | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
|
||
<mj-section padding-top="0"> | ||
<mj-column> | ||
<mj-social font-size="12px" icon-size="30px" mode="horizontal"> | ||
<mj-social-element border-radius="4px" name="twitter" href="https://mjml.io/"></mj-social-element> | ||
|
||
<mj-social-element border-radius="4px" name="linkedin" href="https://www.linkedin.com/in/maciej-matuszewski-5087a975/"></mj-social-element> | ||
</mj-social> | ||
</mj-column> | ||
</mj-section> | ||
</mj-body> | ||
</mjml> |
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,7 @@ | ||
module.exports = { | ||
module: { | ||
rules: [ | ||
{ test: /\.mjml$/, loader: 'mjml-loader' } | ||
] | ||
} | ||
} |
Oops, something went wrong.