Add powered by Probo in email footer
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
BIN
apps/console/public/logos/probo-gray-small.png
Normal file
BIN
apps/console/public/logos/probo-gray-small.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
|
||||
13
packages/emails/src/components/ProboLogo.tsx
Normal file
13
packages/emails/src/components/ProboLogo.tsx
Normal 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"
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user