Merge pull request #43 from akamensky/master

Add option for button text color inlining
This commit is contained in:
Mathieu Cornic 2018-09-03 00:20:33 +02:00 committed by GitHub
commit ab1a08cd57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -367,7 +367,7 @@ func (dt *Default) HTMLTemplate() string {
<tr>
<td align="center">
<div>
<a href="{{ $action.Button.Link }}" class="button" style="background-color: {{ $action.Button.Color }}" target="_blank">
<a href="{{ $action.Button.Link }}" class="button" style="background-color: {{ $action.Button.Color }}; color: {{ $action.Button.TextColor }};" target="_blank">
{{ $action.Button.Text }}
</a>
</div>

View File

@ -367,7 +367,7 @@ func (dt *Flat) HTMLTemplate() string {
<tr>
<td align="center">
<div>
<a href="{{ $action.Button.Link }}" class="button" style="background-color: {{ $action.Button.Color }}" target="_blank">
<a href="{{ $action.Button.Link }}" class="button" style="background-color: {{ $action.Button.Color }}; color: {{ $action.Button.TextColor }}" target="_blank">
{{ $action.Button.Text }}
</a>
</div>

View File

@ -104,9 +104,10 @@ type Action struct {
// Button defines an action to launch
type Button struct {
Color string
Text string
Link string
Color string
TextColor string
Text string
Link string
}
// Template is the struct given to Golang templating