Skip to content

Commit

Permalink
Remove background images for footer and header (#5266)
Browse files Browse the repository at this point in the history
* Remove background images for footer and header

* requests

* remove images

* remove text
  • Loading branch information
codemist authored Oct 30, 2024
1 parent 08ad1b4 commit 3446c47
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 19 deletions.
Binary file removed public/images/email/footer-bg-shapes.png
Binary file not shown.
Binary file removed public/images/email/hero-bg-gradient.png
Binary file not shown.
4 changes: 2 additions & 2 deletions src/emails/components/EmailHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const EmailHero = (props: Props) => {
<mj-wrapper padding="24px 16px">
<mj-section
padding="10px 12px"
css-class="hero_background"
border-radius="16px 16px 0 0"
background-color="#E7DFFF"
>
<mj-group>
<mj-column
Expand Down Expand Up @@ -58,7 +58,7 @@ export const EmailHero = (props: Props) => {
</mj-column>
</mj-group>
</mj-section>
<mj-section css-class="hero_background" border-radius="0 0 16px 16px">
<mj-section background-color="#E7DFFF" border-radius="0 0 16px 16px">
<mj-column>
<mj-text font-size="20px">
<h2>{props.heading}</h2>
Expand Down
2 changes: 1 addition & 1 deletion src/emails/templates/EmailFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const RedesignedEmailFooter = (props: Props) => {
<mj-wrapper
full-width="full-width"
padding="50px 32px"
css-class="footer_background"
background-color="#F9F9FA"
>
<mj-section>
<mj-column>
Expand Down
18 changes: 2 additions & 16 deletions src/emails/templates/HeaderStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,12 @@ export const MetaTags = () => {
};

export const HeaderStyles = () => {
const hideBgImageOnDarkMode = `
const enforceLightMode = `
:root {
color-scheme: light only;
supported-color-schemes: light only;
}
.footer_background {
background-image: url(${process.env.SERVER_URL}/images/email/footer-bg-shapes.png);
background-position: center bottom;
background-repeat: no-repeat;
color: #000000 !important;
}
.hero_background {
background-image: url(${process.env.SERVER_URL}/images/email/hero-bg-gradient.png);
background-repeat: repeat;
background-position-x: 0;
color: #000000 !important;
}
`;

return <mj-style>{hideBgImageOnDarkMode}</mj-style>;
return <mj-style>{enforceLightMode}</mj-style>;
};

0 comments on commit 3446c47

Please sign in to comment.