Skip to content

Commit 358ed99

Browse files
authored
Merge pull request #5398 from selbekk/front-page-content
Add some front page content
2 parents 9d79482 + 9b75131 commit 358ed99

File tree

3 files changed

+133
-6
lines changed

3 files changed

+133
-6
lines changed

docusaurus/website/pages/en/index.js

Lines changed: 126 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ class HomeSplash extends React.Component {
7979
<Button href={docUrl('getting-started', language)}>
8080
Getting Started
8181
</Button>
82-
<Button href={docUrl('documentation-intro', language)}>Documentation</Button>
82+
<Button href={docUrl('documentation-intro', language)}>
83+
Documentation
84+
</Button>
8385
</PromoSection>
8486
</div>
8587
</SplashContainer>
@@ -89,16 +91,23 @@ class HomeSplash extends React.Component {
8991

9092
const Block = props => (
9193
<Container
92-
padding={['bottom', 'top']}
94+
padding={props.padding}
9395
id={props.id}
9496
background={props.background}
9597
>
96-
<GridBlock align="center" contents={props.children} layout={props.layout} />
98+
<GridBlock
99+
align={props.align}
100+
contents={props.children}
101+
layout={props.layout}
102+
/>
97103
</Container>
98104
);
105+
Block.defaultProps = {
106+
padding: ['bottom', 'top'],
107+
};
99108

100-
const Features = () => (
101-
<Block layout="threeColumn" align="left">
109+
const Features = props => (
110+
<Block layout="threeColumn" {...props}>
102111
{[
103112
{
104113
content:
@@ -119,6 +128,114 @@ const Features = () => (
119128
</Block>
120129
);
121130

131+
const GetStarted = props => (
132+
<Block layout="twoColumn" background="light" {...props}>
133+
{[
134+
{
135+
title: 'Get started coding in a matter of seconds!',
136+
content: `With Create React App, you get to focus on **writing React, not boilerplate**.
137+
All you need to do is run a command, install some dependencies, and decide what's for dinner.
138+
139+
\`\`\`sh
140+
npx create-react-app my-app
141+
\`\`\`
142+
`,
143+
},
144+
{
145+
image:
146+
'https://camo.githubusercontent.com/29765c4a32f03bd01d44edef1cd674225e3c906b/68747470733a2f2f63646e2e7261776769742e636f6d2f66616365626f6f6b2f6372656174652d72656163742d6170702f323762343261632f73637265656e636173742e737667',
147+
imageAlign: 'right',
148+
},
149+
]}
150+
</Block>
151+
);
152+
153+
const Update = props => (
154+
<Block layout="twoColumn" {...props}>
155+
{[
156+
{
157+
image: imgUrl('update.png'),
158+
imageAlign: 'left',
159+
},
160+
{
161+
title: 'Easy-to-maintain toolchain',
162+
content: `Keeping a build toolchain up to date with the latest and greatest can be a daunting and time-consuming
163+
task for even the most seasoned developer. Create React App extracts all of those concerns into a single
164+
dependency, which are **easy to update** and **battle tested by thousands**.
165+
166+
\`\`\`sh
167+
npm install react-scripts@latest
168+
\`\`\``,
169+
},
170+
]}
171+
</Block>
172+
);
173+
174+
const FineGrainedFeatures = props => (
175+
<Block layout="fourColumn" align="center" padding={['bottom']} {...props}>
176+
{[
177+
{
178+
title: 'Webpack 4',
179+
content:
180+
'Webpack 4 gives you lightning fast rebuilds and code-splitting out of the box',
181+
},
182+
{
183+
title: 'Babel 7',
184+
content:
185+
'Babel 7 transpiles your code faster than ever, now with support for the new Fragment syntax `</>`',
186+
},
187+
{
188+
title: 'ES2015+',
189+
content:
190+
'Create React App is set up for you to use the features of the future',
191+
},
192+
{
193+
title: 'Jest',
194+
content:
195+
'The best test runner in the business is set up for you by default',
196+
},
197+
{
198+
title: 'Dev-server',
199+
content:
200+
'No-hassle local development thanks to the built-in dev-server',
201+
},
202+
{
203+
title: 'PostCSS',
204+
content:
205+
'Prefixing of new CSS features are done for you through Autoprefixer',
206+
},
207+
{
208+
title: 'SASS',
209+
content: 'Now you can write your styles with the power of SASS',
210+
},
211+
{
212+
title: 'CSS Modules',
213+
content: 'CSS Modules are also supported out of the box',
214+
},
215+
{
216+
title: 'Babel Macros',
217+
content:
218+
'Need some extra Babel-power? Babel Macros gives you just that',
219+
},
220+
{
221+
title: 'SVGs in React',
222+
content:
223+
'Now you can import your SVGs and use them as React components',
224+
},
225+
{
226+
title: 'Progressive Web Apps',
227+
content:
228+
'Every app created by Create React App is a fully Lighthouse-compliant PWA - opt in',
229+
},
230+
{
231+
title: 'Great DX',
232+
content:
233+
"Create React App is made for you - the developer. And we've made your day-to-day so much better",
234+
},
235+
]}
236+
</Block>
237+
);
238+
122239
class Index extends React.Component {
123240
render() {
124241
const language = this.props.language || '';
@@ -127,7 +244,10 @@ class Index extends React.Component {
127244
<div>
128245
<HomeSplash language={language} />
129246
<div className="mainContainer">
130-
<Features />
247+
<Features align="center" />
248+
<GetStarted align="left" />
249+
<Update align="left" />
250+
<FineGrainedFeatures align="center" />
131251
</div>
132252
</div>
133253
);

docusaurus/website/static/css/custom.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,17 @@
1919
text-decoration: underline;
2020
}
2121

22+
.navigationSlider .slidingNav ul {
23+
background: #282c34;
24+
}
25+
2226
@media only screen and (min-device-width: 360px) and (max-device-width: 736px) {
2327
}
2428

2529
@media only screen and (min-width: 1024px) {
30+
.navigationSlider .slidingNav ul {
31+
background: none;
32+
}
2633
}
2734

2835
@media only screen and (max-width: 1023px) {
60.7 KB
Loading

0 commit comments

Comments
 (0)