Better spacing
This commit is contained in:
		
							
								
								
									
										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
 | 
			
		||||
 | 
			
		||||
<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/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" />
 | 
			
		||||
 | 
			
		||||
# Usage
 | 
			
		||||
 | 
			
		||||
@ -82,7 +78,7 @@ if err != nil {
 | 
			
		||||
 | 
			
		||||
This code would output the following HTML template:
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
<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.
 | 
			
		||||
 | 
			
		||||
@ -136,44 +132,22 @@ email := hermes.Email{
 | 
			
		||||
        Greeting: "Dear",
 | 
			
		||||
        Signature: "Sincerly",
 | 
			
		||||
    },
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
email := hermes.Email{
 | 
			
		||||
    Body: hermes.Body{
 | 
			
		||||
        // Title will override `Name`
 | 
			
		||||
        Title: "Welcome to Mailgen",
 | 
			
		||||
    },
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
// Configure hermes by setting a theme and your product info
 | 
			
		||||
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`.
 | 
			
		||||
@ -269,7 +243,7 @@ email := hermes.Email{
 | 
			
		||||
            {Key: "Address", Value: "221B Baker Street, London"},
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Troubleshooting
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user