Better spacing
This commit is contained in:
parent
bfde01c13c
commit
d64ba0eada
38
README.md
38
README.md
|
@ -5,11 +5,7 @@ It's a package that generates clean, responsive HTML e-mails for sending transac
|
||||||
|
|
||||||
# Demo
|
# Demo
|
||||||
|
|
||||||
<img src="https://raw.github.com/matcornic/hermes/master/screens/default/welcome.png" height="400" />
|
<img src="https://raw.github.com/matcornic/hermes/master/screens/default/welcome.png" height="400" /> <img src="https://raw.github.com/matcornic/hermes/master/screens/default/reset.png" height="400" /> <img src="https://raw.github.com/matcornic/hermes/master/screens/default/receipt.png" height="400" />
|
||||||
|
|
||||||
<img src="https://raw.github.com/matcornic/hermes/master/screens/default/reset.png" height="400" />
|
|
||||||
|
|
||||||
<img src="https://raw.github.com/matcornic/hermes/master/screens/default/receipt.png" height="400" />
|
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
|
@ -82,7 +78,7 @@ if err != nil {
|
||||||
|
|
||||||
This code would output the following HTML template:
|
This code would output the following HTML template:
|
||||||
|
|
||||||
![Demo](screens/demo.png)
|
<img src="https://raw.github.com/matcornic/hermes/master/screens/demo.png" height="400" />
|
||||||
|
|
||||||
> Theme templates will be incorporated in your application binary. If you want to use external templates (for configuration), use your own theme by implementing `hermes.Theme` interface with code searching for your files.
|
> Theme templates will be incorporated in your application binary. If you want to use external templates (for configuration), use your own theme by implementing `hermes.Theme` interface with code searching for your files.
|
||||||
|
|
||||||
|
@ -136,44 +132,22 @@ email := hermes.Email{
|
||||||
Greeting: "Dear",
|
Greeting: "Dear",
|
||||||
Signature: "Sincerly",
|
Signature: "Sincerly",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
To use a custom title string rather than a greeting/name introduction, provide it instead of `Name`:
|
To use a custom title string rather than a greeting/name introduction, provide it instead of `Name`:
|
||||||
|
|
||||||
```js
|
|
||||||
var email = {
|
|
||||||
body: {
|
|
||||||
// Title will override `name`
|
|
||||||
title: 'Welcome to Mailgen!'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
```go
|
```go
|
||||||
email := hermes.Email{
|
email := hermes.Email{
|
||||||
Body: hermes.Body{
|
Body: hermes.Body{
|
||||||
// Title will override `Name`
|
// Title will override `Name`
|
||||||
Title: "Welcome to Mailgen",
|
Title: "Welcome to Mailgen",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
To customize the `Copyright`, override it when initializing `Hermes` within your `Product` as follows:
|
To customize the `Copyright`, override it when initializing `Hermes` within your `Product` as follows:
|
||||||
|
|
||||||
```js
|
|
||||||
// Configure mailgen
|
|
||||||
var mailGenerator = new Mailgen({
|
|
||||||
theme: 'salted',
|
|
||||||
product: {
|
|
||||||
name: 'Mailgen',
|
|
||||||
link: 'https://mailgen.js/',
|
|
||||||
// Custom copyright notice
|
|
||||||
copyright: 'Copyright © 2016 Mailgen. All rights reserved.',
|
|
||||||
}
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
```go
|
```go
|
||||||
// Configure hermes by setting a theme and your product info
|
// Configure hermes by setting a theme and your product info
|
||||||
h := hermes.Hermes{
|
h := hermes.Hermes{
|
||||||
|
@ -212,7 +186,7 @@ email := hermes.Email{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
To inject multiple action buttons in to the e-mail, supply another struct in Actions slice `Action`.
|
To inject multiple action buttons in to the e-mail, supply another struct in Actions slice `Action`.
|
||||||
|
@ -269,7 +243,7 @@ email := hermes.Email{
|
||||||
{Key: "Address", Value: "221B Baker Street, London"},
|
{Key: "Address", Value: "221B Baker Street, London"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
Loading…
Reference in New Issue