-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add January Bump card to My Home screen #97692
Merged
+82
−4
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
client/my-sites/customer-home/cards/tasks/january-bump/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { localizeUrl } from '@automattic/i18n-utils'; | ||
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={ localizeUrl( | ||
'https://wordpress.com/pricing/start-your-someday-project?ref=my-home-card' | ||
) } | ||
completeOnStart={ false } | ||
illustration={ januaryBumpIllustration } | ||
taskId={ TASK_JANUARY_BUMP } | ||
/> | ||
); | ||
}; | ||
|
||
export default JanuaryBump; |
45 changes: 45 additions & 0 deletions
45
client/my-sites/customer-home/cards/tasks/january-bump/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this because this was causing the top card margin to be removed on larger screens: