Skip to content

Commit

Permalink
fix: don't print useless blank CSS properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Cornic committed Feb 26, 2019
1 parent dddf5c3 commit f9b74be
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 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 }}; color: {{ $action.Button.TextColor }};" target="_blank">
<a href="{{ $action.Button.Link }}" class="button" style="{{ with $action.Button.Color }}background-color: {{ . }};{{ end }} {{ with $action.Button.TextColor }}color: {{ . }};{{ end }}" target="_blank">
{{ $action.Button.Text }}
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/default/default.receipt.html
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ <h1>Hi Jon Snow,</h1>
<tr>
<td align="center">
<div>
<a href="https://hermes-example.com/dashboard" class="button" style="background-color: " target="_blank">
<a href="https://hermes-example.com/dashboard" class="button" style=" " target="_blank">
Go to Dashboard
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/default/default.reset.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ <h1>Hi Jon Snow,</h1>
<tr>
<td align="center">
<div>
<a href="https://hermes-example.com/reset-password?token=d9729feb74992cc3482b350163a1a010" class="button" style="background-color: #DC4D2F" target="_blank">
<a href="https://hermes-example.com/reset-password?token=d9729feb74992cc3482b350163a1a010" class="button" style="background-color: #DC4D2F; " target="_blank">
Reset your password
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/default/default.welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ <h1>Hi Jon Snow,</h1>
<tr>
<td align="center">
<div>
<a href="https://hermes-example.com/confirm?token=d9729feb74992cc3482b350163a1a010" class="button" style="background-color: " target="_blank">
<a href="https://hermes-example.com/confirm?token=d9729feb74992cc3482b350163a1a010" class="button" style=" " target="_blank">
Confirm your account
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/flat/flat.receipt.html
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ <h1>Hi Jon Snow,</h1>
<tr>
<td align="center">
<div>
<a href="https://hermes-example.com/dashboard" class="button" style="background-color: " target="_blank">
<a href="https://hermes-example.com/dashboard" class="button" style=" " target="_blank">
Go to Dashboard
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/flat/flat.reset.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ <h1>Hi Jon Snow,</h1>
<tr>
<td align="center">
<div>
<a href="https://hermes-example.com/reset-password?token=d9729feb74992cc3482b350163a1a010" class="button" style="background-color: #DC4D2F" target="_blank">
<a href="https://hermes-example.com/reset-password?token=d9729feb74992cc3482b350163a1a010" class="button" style="background-color: #DC4D2F; " target="_blank">
Reset your password
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/flat/flat.welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ <h1>Hi Jon Snow,</h1>
<tr>
<td align="center">
<div>
<a href="https://hermes-example.com/confirm?token=d9729feb74992cc3482b350163a1a010" class="button" style="background-color: " target="_blank">
<a href="https://hermes-example.com/confirm?token=d9729feb74992cc3482b350163a1a010" class="button" style=" " target="_blank">
Confirm your account
</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 }}; color: {{ $action.Button.TextColor }}" target="_blank">
<a href="{{ $action.Button.Link }}" class="button" style="{{ with $action.Button.Color }}background-color: {{ . }};{{ end }} {{ with $action.Button.TextColor }}color: {{ . }};{{ end }}" target="_blank">
{{ $action.Button.Text }}
</a>
</div>
Expand Down

0 comments on commit f9b74be

Please sign in to comment.