Add option for button text color inlining

This commit is contained in:
Alexey Kamenskiy 2018-09-02 22:04:10 +08:00
parent 23ab47deb5
commit c34318393d
3 changed files with 6 additions and 5 deletions

View File

@ -367,7 +367,7 @@ func (dt *Default) HTMLTemplate() string {
<tr> <tr>
<td align="center"> <td align="center">
<div> <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 }} {{ $action.Button.Text }}
</a> </a>
</div> </div>

View File

@ -367,7 +367,7 @@ func (dt *Flat) HTMLTemplate() string {
<tr> <tr>
<td align="center"> <td align="center">
<div> <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 }} {{ $action.Button.Text }}
</a> </a>
</div> </div>

View File

@ -105,6 +105,7 @@ type Action struct {
// Button defines an action to launch // Button defines an action to launch
type Button struct { type Button struct {
Color string Color string
TextColor string
Text string Text string
Link string Link string
} }