Skip to content
This repository was archived by the owner on Apr 19, 2021. It is now read-only.

Commit 94c5aec

Browse files
nisarhassan12svenefftinge
authored andcommitted
[pricing] add self-hosted plans.
1 parent 468d34f commit 94c5aec

File tree

4 files changed

+155
-3
lines changed

4 files changed

+155
-3
lines changed

src/components/PricingBox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ const PricingBox: React.SFC<PricingBoxProps> = ({
275275
btnBackground={btnBackground}
276276
>
277277
<h4>{title}</h4>
278-
{img}
278+
{img ? img : null}
279279
{price ? <div className="price">{price}</div> : null}
280280
{duration ? <div className="duration">{duration}</div> : null}
281281
{feature ? <div className="feature">{feature}</div> : null}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import React from 'react'
2+
3+
import styled from '@emotion/styled'
4+
import IconTick from '../../resources/icon-tick.svg'
5+
import { colors, borders } from '../../styles/variables'
6+
7+
const StyledSelfHostedPlan = styled.div`
8+
display: flex;
9+
flex-direction: column;
10+
justify-content: space-between;
11+
padding: 3rem 4rem;
12+
background: ${colors.white};
13+
border: ${borders.light};
14+
margin-bottom: 3rem;
15+
16+
div:first-of-type {
17+
margin-bottom: 4rem;
18+
}
19+
20+
h3 {
21+
margin-bottom: 1rem;
22+
23+
span {
24+
font-weight: 400;
25+
font-size: 80%;
26+
}
27+
}
28+
29+
h4 {
30+
margin-bottom: 3rem;
31+
}
32+
33+
ul {
34+
list-style-image: url(${IconTick});
35+
list-style-position: inside;
36+
text-align: left;
37+
font-size: 85%;
38+
}
39+
`
40+
41+
export interface SelfHostedPlanProps {
42+
title: string | JSX.Element
43+
subtitle: string
44+
features: string[]
45+
btnText: string
46+
href: string
47+
}
48+
49+
const SelfHostedPlan = ({ title, subtitle, features, btnText, href }: SelfHostedPlanProps) => (
50+
<StyledSelfHostedPlan>
51+
<div>
52+
<h3>{title}</h3>
53+
<h4>{subtitle}</h4>
54+
<ul>
55+
{
56+
features.map((feature, i) => <li key={i}>{feature}</li>)
57+
}
58+
</ul>
59+
</div>
60+
<div>
61+
<a href={href} className="btn">{btnText}</a>
62+
</div>
63+
</StyledSelfHostedPlan>
64+
)
65+
66+
export default SelfHostedPlan
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import React from 'react'
2+
3+
import styled from '@emotion/styled'
4+
import { Link } from 'gatsby'
5+
import { colors, borders, sizes } from '../../styles/variables'
6+
import SelfHostedPlan, { SelfHostedPlanProps } from './SelfHostedPlan'
7+
import Cloud from '../../resources/cloud.svg'
8+
9+
const StyledSelfHostedPlans = styled.section`
10+
background: ${colors.white};
11+
12+
h3 {
13+
margin-bottom: 2rem;
14+
}
15+
16+
.plans {
17+
position: relative;
18+
padding: 4rem 0;
19+
max-width: 800px;
20+
text-align: center;
21+
background: ${colors.offWhite};
22+
border: ${borders.light};
23+
z-index: 10000;
24+
25+
&__container {
26+
display: flex;
27+
flex-wrap: wrap;
28+
justify-content: space-around;
29+
max-width: 78rem;
30+
margin: 0 auto;
31+
padding: 4rem 8rem 2rem;
32+
}
33+
}
34+
35+
object {
36+
position: absolute;
37+
top: -10rem;
38+
right: -35rem;
39+
z-index: -1;
40+
41+
@media(max-width: ${sizes.breakpoints.lg}) {
42+
display: none;
43+
}
44+
}
45+
`
46+
47+
const plans: SelfHostedPlanProps[] = [
48+
{
49+
title: 'Free',
50+
subtitle: 'For up to 5 users',
51+
features: ['Unlimited Hours', 'Private & Public Repos', 'Admin dashboard'],
52+
btnText: 'Contact Sales',
53+
href: '' // Todo add the href value
54+
},
55+
{
56+
title: <>$20 <span>/month</span></>,
57+
subtitle: 'per user',
58+
features: ['Unlimited Hours', 'Private & Public Repos', 'Admin dashboard', '30-day free trial'],
59+
btnText: 'Contact Sales',
60+
href: '' // Todo add the href value
61+
}
62+
]
63+
64+
const SelfHostedPlans = () => (
65+
<StyledSelfHostedPlans>
66+
<div className="row">
67+
<div className="plans">
68+
<h3>Self-Host Gitpod</h3>
69+
<p>Host Gitpod on your own infrastructure. Learn More.</p>
70+
<div className="plans__container">
71+
{
72+
plans.map((plan: SelfHostedPlanProps, i) => <SelfHostedPlan key={`${i}+${plan.title}`} {...plan} /> )
73+
}
74+
</div>
75+
<Link to="/docs/self-hosted/latest/self-hosted/" className="btn btn--cta">View Install Instructions</Link>
76+
<object role="presentation" tabIndex={-1} data={Cloud} />
77+
</div>
78+
</div>
79+
</StyledSelfHostedPlans>
80+
)
81+
82+
export default SelfHostedPlans

src/pages/pricing.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import Details from '../components/Details'
88
import PricingBoxes from '../components/pricing/PricingBoxes'
99
import Plans from '../components/pricing/Plans'
1010
import Business from '../components/pricing/Business'
11+
import SelfHostedPlans from '../components/self-hosted/SelfHostedPlans'
1112

1213

1314
const PricingPage: React.SFC<{}> = () => (
@@ -18,12 +19,15 @@ const PricingPage: React.SFC<{}> = () => (
1819
>
1920
<div className="grey-container">
2021
<div className="row">
21-
2222
<PricingBoxes />
23+
</div>
24+
25+
<SelfHostedPlans />
2326

27+
<div className="row">
2428
<Plans />
25-
2629
</div>
30+
2731
</div>
2832

2933
<div className="row">

0 commit comments

Comments
 (0)