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

Commit a92bc33

Browse files
committed
update get started section.
Fixes gitpod-io/website#819
1 parent 42f81ca commit a92bc33

File tree

5 files changed

+47
-390
lines changed

5 files changed

+47
-390
lines changed

src/components/gitpod-vs-codespaces/Difference.tsx

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,43 @@ const getBrowser = (userAgent: string) => {
1414
return browser
1515
}
1616

17-
const StyledDifference = styled.section`
17+
const StyledDifference = styled.section<{spacing?: 'small'}>`
18+
padding: ${({spacing}) => spacing === 'small' ? '6rem 0' : ''};
1819
text-align: center;
1920
2021
p {
2122
font-size: 110%;
2223
}
2324
2425
h2 + p {
25-
margin: 3rem 0 2rem;
26+
max-width: 500px;
27+
margin: 3rem auto 2rem;
2628
}
2729
2830
.btn {
2931
margin-bottom: 5rem;
3032
}
3133
`
3234

33-
const Difference = () => {
35+
interface DifferenceProps {
36+
title?: string
37+
spacing?: 'small'
38+
}
39+
40+
const Difference = ({title, spacing}: DifferenceProps) => {
3441
const [browser, setBrowser] = useState()
3542

3643
useEffect(() => {
3744
setBrowser(getBrowser(window.navigator.userAgent))
3845
})
3946

4047
return (
41-
<StyledDifference className="pattern-bg">
48+
<StyledDifference className="pattern-bg" spacing={spacing}>
4249
<div className="row">
4350
<h2>
44-
<strong>Want to See the Difference for Yourself?</strong>
51+
<strong>{title ? title : 'Want to See the Difference for Yourself?'}</strong>
4552
</h2>
46-
<p>Add a Gitpod button to your repository.</p>
53+
<p>Add a Gitpod button to your repository and start your dev environment with a single click.</p>
4754
<a
4855
href={
4956
browser === 'Firefox'

src/components/index/GetStarted.tsx

Lines changed: 27 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,14 @@ import styled from '@emotion/styled'
44
import { sizes } from '../../styles/variables'
55
import { projects } from '../../contents/projects'
66
import Project from './Project'
7-
import PrefixInput from './PrefixInput'
7+
import Difference from '../gitpod-vs-codespaces/Difference'
88

99
const StyledGetStarted = styled.div`
1010
/* ------------------------------------------- */
1111
/* ----- Section Get Started ----- */
1212
/* ------------------------------------------- */
1313
1414
.get-started {
15-
padding-top: 0;
16-
text-align: center;
17-
18-
h3 {
19-
font-weight: 400;
20-
}
21-
22-
&__prefix {
23-
display: flex;
24-
margin-bottom: 12rem;
25-
text-align: left;
26-
}
27-
28-
h2 + p {
29-
font-size: 2rem;
30-
}
31-
32-
/* ----- Projects ----- */
33-
3415
&__projects {
3516
display: flex;
3617
justify-content: space-between;
@@ -55,35 +36,33 @@ const StyledGetStarted = styled.div`
5536
`
5637

5738
const GetStarted = () => (
58-
<StyledGetStarted className="row pattern">
59-
<section className="get-started" id="get-started">
60-
<h2>
61-
<strong>Get Started</strong>
62-
</h2>
63-
<p>
64-
Prefix any GitLab, GitHub, or Bitbucket URL with <strong>gitpod.io/#</strong>
65-
</p>
66-
67-
<div className="get-started__prefix">
68-
<PrefixInput />
69-
</div>
70-
71-
<h3>Or Try an Example Project</h3>
72-
73-
<div className="get-started__projects">
74-
{projects.map((project, i) => (
75-
<Project
76-
key={i}
77-
image={<object role="presentation" tabIndex={-1} data={project.image} />}
78-
title={project.title}
79-
githubUrl={project.githubUrl}
80-
gitlabUrl={project.gitlabUrl}
81-
bitbucketUrl={project.bitbucketUrl}
82-
/>
83-
))}
84-
</div>
39+
<section style={{padding: '0'}}>
40+
<Difference
41+
spacing="small"
42+
title="Get Started"
43+
/>
44+
<section
45+
className="get-started"
46+
id="get-started"
47+
style={{padding: '8rem 0'}}
48+
>
49+
<StyledGetStarted className="row">
50+
<h3 style={{textAlign: 'center', fontWeight: 400}}>Don’t want to open your own repo? Choose an example.</h3>
51+
<div className="get-started__projects">
52+
{projects.map((project, i) => (
53+
<Project
54+
key={i}
55+
image={<object role="presentation" tabIndex={-1} data={project.image} />}
56+
title={project.title}
57+
githubUrl={project.githubUrl}
58+
gitlabUrl={project.gitlabUrl}
59+
bitbucketUrl={project.bitbucketUrl}
60+
/>
61+
))}
62+
</div>
63+
</StyledGetStarted>
64+
</section>
8565
</section>
86-
</StyledGetStarted>
8766
)
8867

8968
export default GetStarted

0 commit comments

Comments
 (0)