Skip to content

Commit

Permalink
Merge pull request #8 from PhantPHP/Builder-optimisations
Browse files Browse the repository at this point in the history
Builder optimisations
  • Loading branch information
lennyrouanet authored Jul 3, 2024
2 parents 4f2b4c8 + c27fb7b commit f053a77
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions component/Service/EmailBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class EmailBuilder
public const TemplateComponentCta = 'component/cta.twig';
public const TemplateComponentOtp = 'component/otp.twig';
public const TemplateComponentMeta = 'component/meta.twig';
public const TemplateComponentDivider = 'component/divider.twig';

protected Twig $twig;

Expand Down Expand Up @@ -81,4 +82,11 @@ public function buildMeta(
]
);
}

public function buildDivider(
): string {
return $this->twig->render(
self::TemplateComponentDivider
);
}
}
1 change: 1 addition & 0 deletions component/Template/component/divider.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<hr style="margin:20px 0;border:none;border-top:1px solid #e8e8e8;"/>
2 changes: 1 addition & 1 deletion component/Template/layout.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{% if header_logo %}
<tr>
<td width="100%" valign="middle" align="center" style="text-align:center">
<img src="{{ header_logo }}" alt="" width="150" height="32" style="vertical-align:bottom;border:0px solid;max-width:100%;width:auto;height:32px;outline:none !important"/>
<img src="{{ header_logo }}" alt="" width="300" height="64" style="vertical-align:bottom;border:0px solid;max-width:100%;width:auto;height:64px;outline:none !important"/>
</td>
</tr>
<tr>
Expand Down

0 comments on commit f053a77

Please sign in to comment.