Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please provide a template example #13

Open
funkenstrahlen opened this issue Mar 7, 2017 · 1 comment
Open

please provide a template example #13

funkenstrahlen opened this issue Mar 7, 2017 · 1 comment

Comments

@funkenstrahlen
Copy link

Can you please add a simple mail template example to the project? I do not really know how to create a template based on what is explained in the readme.

@lcortess
Copy link
Owner

lcortess commented Apr 8, 2017

So you need a folder by email you want, for example:

views/
└── email
    └── reset-password
        ├── html.jade
        └── style.less

The html.jade is a normal jade template (now called pug )

doctype html
html
  head
    meta(name='viewport', content='width=device-width')
    meta(http-equiv='Content-Type', content='text/html; charset=UTF-8')
    title My Email
  body(bgcolor='#f6f6f6')
    // body
    table.body-wrap(bgcolor='#f6f6f6')
      tr
        td
        td.container(bgcolor='#FFFFFF')
          // content
          div.content
            table
              tr
                td(align="center")
                  h3 Reset Password
              tr
                td(align="center")
                  p You are receiving this email because your address was entered in the forgotten password form when signing in my awesome page.
                  p To recover your account and reset your password, please  
                    a(href="#{link}") click here.
                  p If you believe you have received this email in error, please ignore it.

          // /content
        td
    // /body
    // footer
    table.footer-wrap
      tr
        td
        td.container
          // content
          .content
            table
              tr
                td(align='center')
                  p My awesome company
          // /content
        td
    // /footer

on style.less you have to set a normal less file

h1,
  h2,
  h3 {
    color: #111111;
    font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
    font-weight: 200;
    line-height: 1.2em;
    margin: 40px 0 10px;
  }

  h1 {
    font-size: 36px;
  }
  h2 {
    font-size: 28px;
  }
  h3 {
    font-size: 22px;
  }

  p,
  ul,
  ol {
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 10px;
  }

  ul li,
  ol li {
    margin-left: 5px;
    list-style-position: inside;
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants