Skip to content

Commit

Permalink
Add January bump card to My Home
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiucelfilip committed Dec 23, 2024
1 parent 75839a7 commit 158e315
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions client/my-sites/customer-home/cards/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const SECTION_BLOGGING_PROMPT = 'home-section-blogging-prompt';
export const SECTION_BLOGANUARY_BLOGGING_PROMPT = 'home-section-bloganuary-blogging-prompt';
export const SECTION_MANAGE_SITE = 'home-section-manage-site';
export const TASK_AFFILIATES = 'home-task-affiliates';
export const TASK_JANUARY_BUMP = 'home-task-january-bump';
export const TASK_CONNECT_ACCOUNTS = 'home-task-connect-accounts';
export const TASK_EARN_FEATURES = 'home-task-earn-features';
export const TASK_GO_MOBILE_ANDROID = 'home-task-go-mobile-android';
Expand Down
30 changes: 30 additions & 0 deletions client/my-sites/customer-home/cards/tasks/january-bump/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { useTranslate } from 'i18n-calypso';
import januaryBumpIllustration from 'calypso/assets/images/customer-home/illustration--january-bump.png';
import { TASK_JANUARY_BUMP } from 'calypso/my-sites/customer-home/cards/constants';
import Task from 'calypso/my-sites/customer-home/cards/tasks/task';

import './style.scss';

const JanuaryBump = () => {
const translate = useTranslate();

const title = translate( 'Start That ‘Someday Project’ Now' );
const description = translate(
'Whatever your New Year’s resolutions are—from starting a newsletter to taking on the world with a bold new business—tap into the powerful platform that’s here to help you make it happen sooner.'
);

return (
<Task
customClass="task__january-bump"
title={ title }
description={ description }
actionText={ translate( 'Start today' ) }
actionUrl="/pricing/january-bump?ref=january-bump-my-home"
completeOnStart={ false }
illustration={ januaryBumpIllustration }
taskId={ TASK_JANUARY_BUMP }
/>
);
};

export default JanuaryBump;
45 changes: 45 additions & 0 deletions client/my-sites/customer-home/cards/tasks/january-bump/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.task {
&.task__january-bump {
position: relative;

&::before,
&::after {
content: "";
position: absolute;
display: block;
z-index: -1;
}
&::before {
width: 654px;
border-radius: 100%;
height: 654px;
background: #3858e9;
filter: blur(81px);
top: 50%;
left: 50%;
transform: translate(5%, 5%);
}

&::after {
background-image: url(calypso/assets/images/customer-home/plus-pattern-white.png);
top: 0;
left: 0;
width: calc(100% + 32px);
height: calc(100% + 32px);
background-size: 14px;
}

.task__actions {
flex-direction: column;
display: inline-flex;
}
.task__skip {
text-align: left;
}

.task__illustration {
width: 44%;
max-width: 272px;
}
}
}
3 changes: 3 additions & 0 deletions client/my-sites/customer-home/locations/card-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
SECTION_BLOGANUARY_BLOGGING_PROMPT,
SECTION_LEARN_GROW,
TASK_AFFILIATES,
TASK_JANUARY_BUMP,
TASK_CONNECT_ACCOUNTS,
TASK_DOMAIN_UPSELL,
TASK_EARN_FEATURES,
Expand Down Expand Up @@ -78,6 +79,7 @@ import EarnFeatures from 'calypso/my-sites/customer-home/cards/tasks/earn-featur
import Fiverr from 'calypso/my-sites/customer-home/cards/tasks/fiverr';
import GoMobile from 'calypso/my-sites/customer-home/cards/tasks/go-mobile';
import GoogleDomainOwners from 'calypso/my-sites/customer-home/cards/tasks/google-domain-owners';
import JanuaryBump from 'calypso/my-sites/customer-home/cards/tasks/january-bump';
import Marketplace from 'calypso/my-sites/customer-home/cards/tasks/marketplace';
import NoticeHomeLimitedTimeOfferCoupon from 'calypso/my-sites/customer-home/cards/tasks/notice-home-limited-time-offer-coupon';
import PromotePost from 'calypso/my-sites/customer-home/cards/tasks/promote-post';
Expand Down Expand Up @@ -110,6 +112,7 @@ const PRIMARY_CARD_COMPONENTS: CardComponentMap = {
[ NOTICE_SITE_LAUNCH_SELLER_UPSELL ]: SiteLaunchSellerUpsell,
[ NOTICE_STAGING_SITE ]: StagingSiteNotice,
[ TASK_AFFILIATES ]: Affiliates,
[ TASK_JANUARY_BUMP ]: JanuaryBump,
[ TASK_CONNECT_ACCOUNTS ]: ConnectAccounts,
[ TASK_DOMAIN_UPSELL ]: DomainUpsell,
[ TASK_EARN_FEATURES ]: EarnFeatures,
Expand Down

0 comments on commit 158e315

Please sign in to comment.