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

Fix Fork Page issues #384

Merged
merged 5 commits into from
Dec 13, 2023
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import classNames from 'classnames';
import { useContext } from '@wordpress/element';
import { THEME_LIGHT } from '../../../../constants';
import { ThemeContext } from '../../ThemeContextProvider';

/**
* Interface Cards with standard design.
*
Expand All @@ -7,13 +12,22 @@
*/

const HeadingWithSubHeading = ( { title, subtitle } ) => {
const { theme } = useContext( ThemeContext );

return (
<div className="nfd-onboarding-step__heading">
<h2 className="nfd-onboarding-step__heading__title">{ title }</h2>
{ subtitle && (
<div className="nfd-onboarding-step__heading__subtitle">
{ subtitle }
<div className="nfd-onboarding-step__heading__icon"></div>
<div
className={ classNames(
'nfd-onboarding-step__heading__icon',
theme === THEME_LIGHT
? 'nfd-onboarding-step__heading__icon--light'
: null
) }
></div>
</div>
) }
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@
display: inline-flex;
width: 100px;
height: 17px;
margin-left: 4px;
background-image: var(--nfd-onboarding-logo-name);
background-size: contain;
background-repeat: no-repeat;
filter: invert(100%) sepia(100%) saturate(100%) hue-rotate(215deg) brightness(200%) contrast(200%);

&--light {
filter: brightness(0) saturate(100%);
}
}
}
}
35 changes: 28 additions & 7 deletions src/OnboardingSPA/components/StartOptions/stylesheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,43 @@
color: var(--nfd-onboarding-primary);
font-weight: 500;
text-align: center;
font-size: 18px;
font-size: 20px;
}

&__container {
display: flex;
justify-content: center;
flex-wrap: wrap;
align-items: center;
justify-content: center;

@media (max-width: #{ ($break-large) }) {
flex-direction: column;
}

&__options {
flex: 1;
min-width: 310px;
height: 130px;
border: 1px solid #9ca2a7;
text-align: center;
padding: 24px;
padding-top: 50px;
padding: 40px 24px;
margin: 20px;
border-radius: 16px;
color: var(--nfd-onboarding-primary);
font-size: 20px;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
transition: all 200ms ease-in-out;
background-color: rgba(var(--nfd-onboarding-secondary-rgb), 0.25);

@media (max-width: #{ ($break-large) }) {
height: 60px;
margin: 12px;
padding: 12px;
min-width: 85vw;
}

&__span {
background-color: var(--nfd-onboarding-white);
Expand All @@ -41,10 +58,10 @@
}

&__options:hover {
background-color: rgba(6, 0, 0, 0.3);
cursor: pointer;
outline: 2px solid #9ca2a7;
transition: 0.1s linear;
box-shadow: 13px 18px 27px -6px rgba(0, 0, 0, 0.3);
background-color: rgba(var(--nfd-onboarding-secondary-rgb), 0.5);
}

&__heading {
Expand All @@ -54,11 +71,15 @@
line-height: 1;

&__title {
font-weight: 510;
font-weight: 500;
text-align: center;
color: var(--nfd-onboarding-primary);
font-size: 20px;
line-height: 20px;

@media (max-width: #{ ($break-large) }) {
margin: 8px;
}
}

&__subtitle {
Expand Down
12 changes: 10 additions & 2 deletions src/OnboardingSPA/steps/TheFork/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import CommonLayout from '../../components/Layouts/Common';

import { useEffect } from '@wordpress/element';
import { useDispatch } from '@wordpress/data';
import { useSelect, useDispatch } from '@wordpress/data';

import { store as nfdOnboardingStore } from '../../store';
import { FOOTER_SITEGEN, HEADER_SITEGEN } from '../../../constants';
Expand All @@ -12,6 +12,12 @@ import StartOptions from '../../components/StartOptions';
import getContents from './contents';

const TheFork = () => {
const { migrationUrl } = useSelect( ( select ) => {
return {
migrationUrl: select( nfdOnboardingStore ).getMigrationUrl(),
};
} );

const {
setIsHeaderEnabled,
setSidebarActiveView,
Expand Down Expand Up @@ -53,7 +59,9 @@ const TheFork = () => {
<br />
<a
className="nfd-onboarding-step--site-gen__fork__importsite"
href={ content.importlink }
href={ migrationUrl }
target={ '_blank' }
rel={ 'noreferrer' }
>
{ content.importtext }
</a>
Expand Down
8 changes: 6 additions & 2 deletions src/OnboardingSPA/steps/TheFork/stylesheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@

&__fork {
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
align-items: center;

@media (max-width: #{ ($break-large) }) {
margin-bottom: 80px;
}

&__heading {
color: var(--nfd-onboarding-primary);
Expand Down Expand Up @@ -46,7 +50,7 @@
text-align: center;
font-size: 18px;
line-height: 20px;
margin-top: 35px !important;
margin: 35px !important;
}
}
}
Expand Down