-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
222 additions
and
19 deletions.
There are no files selected for viewing
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,47 @@ | ||
[ | ||
{ | ||
"name": "Basis Plan", | ||
"desc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", | ||
"price": 12, | ||
"isMostPop": false, | ||
"features": [ | ||
"Curabitur faucibus", | ||
"massa ut pretium maximus", | ||
"Sed posuere nisi", | ||
"Pellentesque eu nibh et neque", | ||
"Suspendisse a leo", | ||
"Praesent quis venenatis ipsum", | ||
"Duis non diam vel tortor" | ||
] | ||
}, | ||
{ | ||
"name": "Startup", | ||
"desc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", | ||
"price": 35, | ||
"isMostPop": true, | ||
"features": [ | ||
"Curabitur faucibus", | ||
"massa ut pretium maximus", | ||
"Sed posuere nisi", | ||
"Pellentesque eu nibh et neque", | ||
"Suspendisse a leo", | ||
"Praesent quis venenatis ipsum", | ||
"Duis non diam vel tortor" | ||
] | ||
}, | ||
{ | ||
"name": "Enterprise", | ||
"desc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", | ||
"price": 60, | ||
"isMostPop": false, | ||
"features": [ | ||
"Curabitur faucibus", | ||
"massa ut pretium maximus", | ||
"Sed posuere nisi", | ||
"Pellentesque eu nibh et neque", | ||
"Suspendisse a leo", | ||
"Praesent quis venenatis ipsum", | ||
"Duis non diam vel tortor" | ||
] | ||
} | ||
] |
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,47 @@ | ||
[ | ||
{ | ||
"name": "Basic plan", | ||
"desc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", | ||
"price": 12, | ||
"isMostPop": false, | ||
"features": [ | ||
"Curabitur faucibus", | ||
"massa ut pretium maximus", | ||
"Sed posuere nisi", | ||
"Pellentesque eu nibh et neque", | ||
"Suspendisse a leo", | ||
"Praesent quis venenatis ipsum", | ||
"Duis non diam vel tortor" | ||
] | ||
}, | ||
{ | ||
"name": "Startup", | ||
"desc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", | ||
"price": 35, | ||
"isMostPop": true, | ||
"features": [ | ||
"Curabitur faucibus", | ||
"massa ut pretium maximus", | ||
"Sed posuere nisi", | ||
"Pellentesque eu nibh et neque", | ||
"Suspendisse a leo", | ||
"Praesent quis venenatis ipsum", | ||
"Duis non diam vel tortor" | ||
] | ||
}, | ||
{ | ||
"name": "Enterprise", | ||
"desc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", | ||
"price": 60, | ||
"isMostPop": false, | ||
"features": [ | ||
"Curabitur faucibus", | ||
"massa ut pretium maximus", | ||
"Sed posuere nisi", | ||
"Pellentesque eu nibh et neque", | ||
"Suspendisse a leo", | ||
"Praesent quis venenatis ipsum", | ||
"Duis non diam vel tortor" | ||
] | ||
} | ||
] |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,106 @@ | ||
import useSetDocumentTitle from '../hooks/useSetDocumentTitle'; | ||
import { Helmet } from 'react-helmet-async'; | ||
import { useTranslation } from 'react-i18next'; | ||
import axios from 'axios'; | ||
import { useEffect, useState } from 'react'; | ||
|
||
export default function Pricing() { | ||
useSetDocumentTitle({ separator: '-', reverse: true }); | ||
const { t, i18n } = useTranslation(); | ||
const [plans, setPlans] = useState([]); | ||
|
||
return <div className='px-1 max-w-screen-xl mx-auto mt-4 md:px-1 md:mt-9'>Pricing</div>; | ||
useEffect(() => { | ||
axios | ||
.get(`/data/plans.${i18n.language}.json`) | ||
.then((res) => { | ||
setPlans(res.data); | ||
}) | ||
.catch((err) => { | ||
console.log(err); | ||
}); | ||
}, [i18n.language]); | ||
|
||
return ( | ||
<> | ||
<Helmet> | ||
<title>{t('pricing.seo.title')}</title> | ||
<meta | ||
name='description' | ||
content="{t('pricing.seo.description')}" | ||
></meta> | ||
<meta | ||
name='keywords' | ||
content="{t('pricing.seo.keywords')}" | ||
></meta> | ||
</Helmet> | ||
<div className='px-3 max-w-screen-xl mx-auto md:px-0 mt-5 md:mt-16'> | ||
<section className='py-14'> | ||
<div className='max-w-screen-xl mx-auto px-4 text-gray-600 md:px-8'> | ||
<div className='relative max-w-xl mx-auto sm:text-center'> | ||
<h3 className='text-gray-800 text-3xl font-semibold sm:text-4xl'> | ||
Pricing for all sizes | ||
</h3> | ||
<div className='mt-3 max-w-xl'> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam efficitur | ||
consequat nunc. | ||
</p> | ||
</div> | ||
</div> | ||
<div className='mt-16 justify-center gap-6 sm:grid sm:grid-cols-2 sm:space-y-0 lg:grid-cols-3'> | ||
{plans.map((item, idx) => ( | ||
<div | ||
key={idx} | ||
className={`relative flex-1 flex items-stretch flex-col rounded-xl border-2 mt-6 sm:mt-0 ${ | ||
item.isMostPop ? 'mt-10' : '' | ||
}`} | ||
> | ||
{item.isMostPop ? ( | ||
<span className='w-32 absolute -top-5 left-0 right-0 mx-auto px-3 py-2 rounded-full border shadow-md bg-white text-center text-gray-700 text-sm font-semibold'> | ||
Most popular | ||
</span> | ||
) : ( | ||
'' | ||
)} | ||
<div className='p-8 space-y-4 border-b'> | ||
<span className='text-indigo-600 font-medium'>{item.name}</span> | ||
<div className='text-gray-800 text-3xl font-semibold'> | ||
${item.price} <span className='text-xl text-gray-600 font-normal'>/mo</span> | ||
</div> | ||
<p>{item.desc}</p> | ||
<button className='px-3 py-3 rounded-lg w-full font-semibold text-sm duration-150 text-white bg-indigo-600 hover:bg-indigo-500 active:bg-indigo-700'> | ||
Get Started | ||
</button> | ||
</div> | ||
<ul className='p-8 space-y-3'> | ||
<li className='pb-2 text-gray-800 font-medium'> | ||
<p>Features</p> | ||
</li> | ||
{item.features.map((featureItem, idx) => ( | ||
<li | ||
key={idx} | ||
className='flex items-center gap-5' | ||
> | ||
<svg | ||
xmlns='http://www.w3.org/2000/svg' | ||
className='h-5 w-5 text-indigo-600' | ||
viewBox='0 0 20 20' | ||
fill='currentColor' | ||
> | ||
<path | ||
fillRule='evenodd' | ||
d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' | ||
clipRule='evenodd' | ||
></path> | ||
</svg> | ||
{featureItem} | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
</> | ||
); | ||
} |