Add powered by Probo in email footer

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-02-02 13:27:25 +04:00
parent 926d008c60
commit cdf70f3cac
4 changed files with 29 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -19,6 +19,7 @@ import (
"embed"
"fmt"
htmltemplate "html/template"
"net/url"
texttemplate "text/template"
"time"
@@ -39,6 +40,7 @@ type (
PresenterVariables struct {
// Static variables
BaseOrigin string
BaseURL string
SenderCompanyName string
SenderCompanyWebsiteURL string
@@ -67,8 +69,15 @@ func DefaultPresenterConfig(baseURL string) PresenterConfig {
}
func NewPresenterFromConfig(cfg PresenterConfig, fullName string) *Presenter {
baseURL := baseurl.MustParse(cfg.BaseURL)
baseOrigin := url.URL{
Scheme: baseURL.Scheme(),
Host: baseURL.Host(),
}
return &Presenter{
variables: PresenterVariables{
BaseOrigin: baseOrigin.String(),
BaseURL: cfg.BaseURL,
SenderCompanyName: cfg.SenderCompanyName,
SenderCompanyWebsiteURL: cfg.SenderCompanyWebsiteURL,

View File

@@ -1,17 +1,15 @@
import {
Body,
Button,
Container,
Head,
Heading,
Html,
Link,
Preview,
Section,
Text,
} from '@react-email/components';
import * as React from 'react';
import { Logo } from './Logo';
import { ProboLogo } from './ProboLogo';
interface EmailLayoutProps {
subject: string;
@@ -47,6 +45,12 @@ export const EmailLayout = ({
<Text style={footerAddress}>
{"{{.SenderCompanyHeadquarterAddress}}"}
</Text>
<Text style={footerAddress}>
<span style={{verticalAlign: "middle"}}>Powered By </span>
<Link style={{display: "inline-block", height: "16px", verticalAlign: "middle"}} href="https://www.getprobo.com">
<ProboLogo />
</Link>
</Text>
</Section>
</Container>
</Body>

View File

@@ -0,0 +1,13 @@
import { Img } from '@react-email/components';
import * as React from 'react';
export function ProboLogo() {
return (
<Img
style={{verticalAlign: "middle", height: "100%"}}
src="{{.BaseOrigin}}/logos/probo-gray-small.png"
alt="Probo"
height="16"
/>
);
}