Skip to content

Commit

Permalink
Allow default button in e-mails
Browse files Browse the repository at this point in the history
  • Loading branch information
krazzer committed Jul 12, 2022
1 parent 9777b47 commit 89c70ad
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/Views/mail/base.twig
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@
border-color: {{ mainColor }};
color: #ffffff; }
.btn-default table td {
background-color: {{ colorWhite }}; }
.btn-default a {
background-color: {{ colorWhite }};
border-color: #ccc;
color: black; }
/* -------------------------------------
OTHER STYLES THAT MIGHT BE USEFUL
------------------------------------- */
Expand Down Expand Up @@ -246,6 +254,10 @@
.btn-primary a:hover {
background-color: {{ mainColorDark }} !important;
border-color: {{ mainColorDark }} !important; } }
.btn-default table td:hover {
background-color: #eee !important; }
.btn-default a:hover {
background-color: #eee !important; }
</style>
</head>
Expand Down Expand Up @@ -280,7 +292,7 @@

{% if buttons %}
<br><br>
<table border="0" cellpadding="0" cellspacing="0" class="btn btn-primary">
<table border="0" cellpadding="0" cellspacing="0" class="btn">
<tbody>
<tr>
<td align="left">
Expand All @@ -289,11 +301,12 @@
<tr>
{% for button in buttons %}
{% block button %}
<td>
<td class="btn-{{ button.type ?: 'primary' }}">
<a href="{{ button.url }}" target="_blank">
{{ button.label }}
</a>
</td>
<td style="background-color: transparent;">&nbsp;</td>
{% endblock %}
{% endfor %}
</tr>
Expand Down

0 comments on commit 89c70ad

Please sign in to comment.