0.3.1 • Published 6 years ago

foundation-emails-handlebars v0.3.1

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

foundation-emails-handlebars

Handlebars templates, loaded with Foundation Inky, Foundation for Emails and css inlining

Installation

$ npm i foundation-emails-handlebars

Usage

const Compiler = require('foundation-emails-handlebars')

const compile = Compiler({
  data: {
    ROOT: 'http://site.com'
  },
  css: `
    h1 {
      color: red;
    }
  `
})

const template = compile({
  template: `
    <container>
      <row>
        <columns small="12">
          <img width="200" height="100" src="{{{ROOT}}}/logo.jpg">
        </columns>
        <columns small="12">
          <h1>I'm red</h1>
          <h1 class="blue">I'm blue</h1>
          <p>{{foo}}</p>
        </columns>
      </row>
    </container>
  `,
  css: `
    .blue {
      color: blue;
    }
  `
})

template({ foo: 'bar' }) // will produce ugly html, ready to sending via email
0.3.1

6 years ago

0.3.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.0

6 years ago

0.0.1

6 years ago