Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNTOR-3646 - Align Sign in button with Monitor logo #5122

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 31 additions & 29 deletions src/emails/templates/EmailHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,37 @@ export const EmailHero = (props: Props) => {
background-position-x={0}
border-radius="16px 16px 0 0"
>
<mj-column
width="60%"
padding-left="0"
padding-right="0"
vertical-align="middle"
>
<mj-image
alt={l10n.getString("public-nav-name")}
src={`${process.env.SERVER_URL}/images/email/monitor-logo-transparent.png`}
href={`${process.env.SERVER_URL}/user/dashboard/fixed?utm_source=monitor-product&utm_medium=email&utm_campaign=${props.utm_campaign}&utm_content=header-logo${utmContentSuffix}`}
width="200px"
align="left"
/>
</mj-column>
<mj-column
width="40%"
padding-left="0"
padding-right="0"
vertical-align="middle"
>
<mj-text align="right">
<a
href={`${process.env.SERVER_URL}/user/dashboard/fixed?utm_source=monitor-product&utm_medium=email&utm_campaign=${props.utm_campaign}&utm_content=sign-in${utmContentSuffix}`}
style={{ color: "#0060DF" }}
>
{l10n.getString("email-header-button-sign-in")}
</a>
</mj-text>
</mj-column>
<mj-group>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mj-group forces both mj-column on the same row, similar to a flexbox. As such, the 70% and 30% widths apply on smaller device widths. I added a video demo.

<mj-column
width="70%"
padding-left="0"
padding-right="0"
vertical-align="middle"
>
<mj-image
alt={l10n.getString("public-nav-name")}
src={`${process.env.SERVER_URL}/images/email/monitor-logo-transparent.png`}
href={`${process.env.SERVER_URL}/user/dashboard/fixed?utm_source=monitor-product&utm_medium=email&utm_campaign=${props.utm_campaign}&utm_content=header-logo${utmContentSuffix}`}
align="left"
width="200px"
/>
</mj-column>
<mj-column
width="30%"
padding-left="0"
padding-right="0"
vertical-align="middle"
>
<mj-text align="right">
<a
href={`${process.env.SERVER_URL}/user/dashboard/fixed?utm_source=monitor-product&utm_medium=email&utm_campaign=${props.utm_campaign}&utm_content=sign-in${utmContentSuffix}`}
style={{ color: "#0060DF" }}
>
{l10n.getString("email-header-button-sign-in")}
</a>
</mj-text>
</mj-column>
</mj-group>
</mj-section>
<mj-section
padding="20px 32px"
Expand Down
Loading