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

[TAS-921] 👔 Add Newsletter CTA & Instagram link in footer #41

Merged
merged 6 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
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
Binary file added src/assets/social-elements/v2/instagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
124 changes: 73 additions & 51 deletions src/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import * as React from 'react';
import {
MjmlButton,
MjmlColumn,
MjmlDivider,
MjmlImage,
MjmlSocial,
MjmlSocialElement,
MjmlText,
} from 'mjml-react';
import { FormattedMessage, useIntl } from 'react-intl';

import * as Colors from '../constants/colors';
import { getAssetPath } from '../utils/url';
import { getAssetPath, wrapUtm } from '../utils/url';

import { BasicSection } from './sections/basic';
import { HelpCenterLink } from './help-center-link';
import { UnsubscribeLink } from './unsubscribe-link';
import { useIntl } from 'react-intl';

const socialElements = [
{
Expand All @@ -32,6 +33,11 @@ const socialElements = [
href: 'https://blog.like.co',
assetPath: '/social-elements/v2/blog.png',
},
{
key: 'instagram',
href: 'https://www.instagram.com/liker.land',
assetPath: '/social-elements/v2/instagram.png',
},
];

export const FooterSection = ({
Expand All @@ -43,55 +49,71 @@ export const FooterSection = ({
}) => {
const intl = useIntl();
return (
<BasicSection
backgroundColor="white"
backgroundUrl={undefined}
paddingTop={32}
paddingBottom={24}
>
<MjmlColumn>
{shouldShowDivider && (
<MjmlDivider
paddingTop={32}
paddingBottom={32}
borderColor={Colors.PaleCyan}
borderWidth={2}
/>
)}
<MjmlImage
width={220}
src={getAssetPath(
`/social-elements/v2/twitter-large-${intl.locale}.png`
<>
<BasicSection backgroundColor="white">
<MjmlColumn>
{shouldShowDivider && (
<MjmlDivider
paddingTop={0}
paddingBottom={32}
borderColor={Colors.PaleCyan}
borderWidth={2}
/>
)}
href="https://twitter.com/likecoin"
/>
<MjmlSocial
mode="horizontal"
paddingTop={16}
paddingBottom={16}
innerPadding="6px"
iconSize="32px"
iconHeight="32px"
borderRadius={16}
containerBackgroundColor="white"
>
{socialElements.map(({ key, href, assetPath }) => (
<MjmlSocialElement
key={key}
href={href}
src={getAssetPath(assetPath)}
>
{null}
</MjmlSocialElement>
))}
</MjmlSocial>
<MjmlText align="center" padding={4}>
<HelpCenterLink />
</MjmlText>
<MjmlText align="center" padding={4}>
<UnsubscribeLink link={unsubscribeLink} />
</MjmlText>
</MjmlColumn>
</BasicSection>
<MjmlButton
color={Colors.LikeGreen}
fontWeight={600}
backgroundColor={Colors.LighterCyan}
borderRadius={14}
href={wrapUtm('https://newsletter.like.co')}
rel="noopener noreferrer"
>
<FormattedMessage id="footer_newsletter_button" />
</MjmlButton>
</MjmlColumn>
</BasicSection>
<BasicSection
backgroundColor="white"
backgroundUrl={undefined}
paddingTop={0}
paddingBottom={24}
>
<MjmlColumn>
<MjmlImage
width={220}
src={getAssetPath(
`/social-elements/v2/twitter-large-${intl.locale}.png`
)}
href={wrapUtm('https://twitter.com/likerland')}
/>
<MjmlSocial
mode="horizontal"
paddingTop={16}
paddingBottom={16}
innerPadding="6px"
iconSize="32px"
iconHeight="32px"
borderRadius={16}
containerBackgroundColor="white"
>
{socialElements.map(({ key, href, assetPath }) => (
<MjmlSocialElement
key={key}
href={wrapUtm(href)}
src={getAssetPath(assetPath)}
>
{null}
</MjmlSocialElement>
))}
</MjmlSocial>
<MjmlText align="center" padding={4}>
<HelpCenterLink />
</MjmlText>
<MjmlText align="center" padding={4}>
<UnsubscribeLink link={unsubscribeLink} />
</MjmlText>
</MjmlColumn>
</BasicSection>
</>
);
};
1 change: 1 addition & 0 deletions src/i18n/translations/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"cta.sponsor-link.hint": "用这条链结建立你的粉丝团。<a>详情</a>",
"cta.writing-nft.title": "立即收藏以表支持",
"download": "下载:",
"footer_newsletter_button": "订阅电子报",
"greeting": "你好 {name}:",
"header.manage-delegation": "管理委託",
"help.center.text": "帮助中心",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"cta.sponsor-link.hint": "Build your fans group by this link. <a>Learn more</a>",
"cta.writing-nft.title": "Collect to support now",
"download": "Download:",
"footer_newsletter_button": "Subscribe Newsletter",
"greeting": "Dear {name}",
"header.manage-delegation": "Manage delegation",
"help.center.text": "Help Center",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/translations/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"cta.sponsor-link.hint": "用這條鏈結建立你的粉絲團。<a>詳情</a>",
"cta.writing-nft.title": "立即收藏以表支持",
"download": "下載:",
"footer_newsletter_button": "訂閱電子報",
"greeting": "你好 {name}:",
"header.manage-delegation": "管理委託",
"help.center.text": "幫助中心",
Expand Down
2 changes: 1 addition & 1 deletion src/templates/basic-v2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const BasicV2Template = ({
subtitle,
subtitlePrepend,
content,
cta = 'writing-nft',
cta = '',
unsubscribeLink,
language,
}: BasicV2TemplateProps) => {
Expand Down
2 changes: 1 addition & 1 deletion src/templates/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const BasicTemplate = ({
subtitle,
subtitlePrepend,
content,
cta = 'writing-nft',
cta = '',
unsubscribeLink,
language,
}: BasicTemplateProps) => {
Expand Down
Loading
Loading