mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
Refined benefits
This commit is contained in:
parent
c0e69ea29b
commit
48a52e942f
@ -19,7 +19,7 @@ const DEV_MODE_DATA = {
|
||||
showPopup: true,
|
||||
site: Fixtures.site,
|
||||
member: Fixtures.member.paid,
|
||||
page: 'signup'
|
||||
page: 'accountHome'
|
||||
};
|
||||
|
||||
function SentryErrorBoundary({site, children}) {
|
||||
|
@ -410,7 +410,8 @@ export const PlanSectionStyles = `
|
||||
}
|
||||
|
||||
.gh-portal-singleproduct-benefits .gh-portal-product-description {
|
||||
margin-bottom: 12px !important;
|
||||
margin-top: 8px !important;
|
||||
margin-bottom: 24px !important;
|
||||
}
|
||||
|
||||
.gh-portal-singleproduct-benefits .gh-portal-product-benefit:last-of-type {
|
||||
@ -560,7 +561,7 @@ function PlanBenefits({product, plans, selectedPlan}) {
|
||||
const benefitContainerClass = !product?.benefits?.length || planBenefits.length <= 1 ? 'default-benefits' : '';
|
||||
return (
|
||||
<div className={'gh-portal-singleproduct-benefits gh-portal-product-benefits ' + benefitContainerClass}>
|
||||
<div className='gh-portal-product-description'> {planDescription} </div>
|
||||
{(product.description ? <div className='gh-portal-product-description'> {planDescription} </div> : '')}
|
||||
{benefits}
|
||||
</div>
|
||||
);
|
||||
|
@ -26,8 +26,8 @@ const prices = [
|
||||
const products = [
|
||||
{
|
||||
id: 'product_1',
|
||||
name: 'Gold',
|
||||
description: 'A bit longer description',
|
||||
name: 'Ball is life membership',
|
||||
description: 'Get access to everything and lock in early adopter pricing for life + listen to my podcast',
|
||||
monthlyPrice: {
|
||||
id: '6085adc776909b1a2382369a',
|
||||
stripe_price_id: '7d6c89c0289ca1731226e86b95b5a162085b8561ca0d10d3a4f03afd3e3e6ba6',
|
||||
@ -49,29 +49,25 @@ const products = [
|
||||
amount: 20000,
|
||||
type: 'recurring',
|
||||
interval: 'year'
|
||||
}
|
||||
// benefits: [
|
||||
// {
|
||||
// id: 'a1',
|
||||
// name: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec maximus odio'
|
||||
// },
|
||||
// {
|
||||
// id: 'a2',
|
||||
// name: 'Aliquam nec condimentum libero. In in turpis quis nibh faucibus bibendum mollis et elit'
|
||||
// },
|
||||
// {
|
||||
// id: 'a3',
|
||||
// name: 'Nullam hendrerit accumsan facilisis'
|
||||
// },
|
||||
// {
|
||||
// id: 'a4',
|
||||
// name: 'Vivamus vel elit lectus'
|
||||
// },
|
||||
// {
|
||||
// id: 'a5',
|
||||
// name: 'Maecenas tempus cursus metus'
|
||||
// }
|
||||
// ]
|
||||
},
|
||||
benefits: [
|
||||
{
|
||||
id: 'a1',
|
||||
name: 'Limited early adopter pricing'
|
||||
},
|
||||
{
|
||||
id: 'a2',
|
||||
name: 'Latest gear reviews'
|
||||
},
|
||||
{
|
||||
id: 'a3',
|
||||
name: 'Weekly email newsletter'
|
||||
},
|
||||
{
|
||||
id: 'a4',
|
||||
name: 'Listen to my podcast'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'product_2',
|
||||
@ -102,19 +98,15 @@ const products = [
|
||||
benefits: [
|
||||
{
|
||||
id: 'b1',
|
||||
name: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec maximus odio'
|
||||
name: 'Limited early adopter pricing'
|
||||
},
|
||||
{
|
||||
id: 'b2',
|
||||
name: 'Aliquam nec condimentum libero. In in turpis quis nibh faucibus bibendum mollis et elit'
|
||||
name: 'Latest gear reviews'
|
||||
},
|
||||
{
|
||||
id: 'b3',
|
||||
name: 'Nullam hendrerit accumsan facilisis'
|
||||
},
|
||||
{
|
||||
id: 'b4',
|
||||
name: 'Vivamus vel elit lectus'
|
||||
name: 'Weekly email newsletter'
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -147,15 +139,11 @@ const products = [
|
||||
benefits: [
|
||||
{
|
||||
id: 'c1',
|
||||
name: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec maximus odio'
|
||||
name: 'Latest gear reviews'
|
||||
},
|
||||
{
|
||||
id: 'c2',
|
||||
name: 'Aliquam nec condimentum libero. In in turpis quis nibh faucibus bibendum mollis et elit'
|
||||
},
|
||||
{
|
||||
id: 'c3',
|
||||
name: 'Nullam hendrerit accumsan facilisis'
|
||||
name: 'Weekly email newsletter'
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -184,7 +172,7 @@ export const site = {
|
||||
is_stripe_configured: true,
|
||||
portal_button: true,
|
||||
portal_name: true,
|
||||
portal_plans: ['free', 'yearly'],
|
||||
portal_plans: ['monthly', 'yearly'],
|
||||
portal_button_icon: 'icon-1',
|
||||
portal_button_signup_text: 'Subscribe now',
|
||||
portal_button_style: 'icon-and-text',
|
||||
|
@ -250,7 +250,7 @@ export function getProductBenefits({product, site = null}) {
|
||||
const yearlyDiscount = calculateDiscount(product.monthlyPrice.amount, product.yearlyPrice.amount);
|
||||
const productBenefits = product?.benefits || [];
|
||||
const monthlyBenefits = product?.benefits?.length > 0 ? [...productBenefits] : [{
|
||||
name: 'Full access'
|
||||
name: 'Full access to all articles'
|
||||
}];
|
||||
const yearlyBenefits = [...monthlyBenefits];
|
||||
if (yearlyDiscount > 0 && availablePrices.length > 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user