Skip to content

Commit

Permalink
Merge pull request #43 from akamensky/master
Browse files Browse the repository at this point in the history
Add option for button text color inlining
  • Loading branch information
matcornic authored Sep 2, 2018
2 parents 23ab47d + c343183 commit ab1a08c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion default.go
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion flat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
7 changes: 4 additions & 3 deletions hermes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab1a08c

Please sign in to comment.