-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some front page content #5398
Changes from 4 commits
5b9b338
4ea222f
8ea3222
10110a6
740ff8b
83542fc
9b75131
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,7 +79,9 @@ class HomeSplash extends React.Component { | |
<Button href={docUrl('getting-started', language)}> | ||
Get started | ||
</Button> | ||
<Button href={docUrl('documentation-intro', language)}>Documentation</Button> | ||
<Button href={docUrl('documentation-intro', language)}> | ||
Documentation | ||
</Button> | ||
</PromoSection> | ||
</div> | ||
</SplashContainer> | ||
|
@@ -89,16 +91,23 @@ class HomeSplash extends React.Component { | |
|
||
const Block = props => ( | ||
<Container | ||
padding={['bottom', 'top']} | ||
padding={props.padding} | ||
id={props.id} | ||
background={props.background} | ||
> | ||
<GridBlock align="center" contents={props.children} layout={props.layout} /> | ||
<GridBlock | ||
align={props.align} | ||
contents={props.children} | ||
layout={props.layout} | ||
/> | ||
</Container> | ||
); | ||
Block.defaultProps = { | ||
padding: ['bottom', 'top'], | ||
}; | ||
|
||
const Features = () => ( | ||
<Block layout="threeColumn" align="left"> | ||
const Features = props => ( | ||
<Block layout="threeColumn" {...props}> | ||
{[ | ||
{ | ||
content: | ||
|
@@ -119,6 +128,110 @@ const Features = () => ( | |
</Block> | ||
); | ||
|
||
const GetStarted = props => ( | ||
<Block layout="twoColumn" background="light" {...props}> | ||
{[ | ||
{ | ||
title: 'Get started coding in a matter of seconds!', | ||
content: `With Create React App, you get to focus on **writing React, not boilerplate**. | ||
All you need to do is run a command, install some dependencies, and decide what's for dinner. | ||
|
||
npx create-react-app my-app | ||
`, | ||
}, | ||
{ | ||
image: | ||
'https://camo.githubusercontent.com/29765c4a32f03bd01d44edef1cd674225e3c906b/68747470733a2f2f63646e2e7261776769742e636f6d2f66616365626f6f6b2f6372656174652d72656163742d6170702f323762343261632f73637265656e636173742e737667', | ||
imageAlign: 'right', | ||
}, | ||
]} | ||
</Block> | ||
); | ||
|
||
const Update = props => ( | ||
<Block layout="twoColumn" {...props}> | ||
{[ | ||
{ | ||
image: imgUrl('update.png'), | ||
imageAlign: 'left', | ||
}, | ||
{ | ||
title: 'Easy-to-maintain toolchain', | ||
content: `Keeping a build toolchain up to date with the latest and greatest can be a daunting and time-consuming | ||
task for even the most seasoned developer. Create React App extracts all of those concerns into a single | ||
dependency, which are **easy to update** and **battle tested by thousands** | ||
selbekk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
npm install react-scripts@latest`, | ||
}, | ||
]} | ||
</Block> | ||
); | ||
|
||
const FineGrainedFeatures = props => ( | ||
<Block layout="fourColumn" align="center" padding={['bottom']} {...props}> | ||
{[ | ||
{ | ||
title: 'Webpack 4', | ||
content: | ||
'Webpack 4 gives you lightning fast rebuilds and code-splitting out of the box', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider punctuation (e.g. add periods) throughout to be consistent? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I landed on removing the punctuation that was there, as i thought it looked better with no punctuation than a period after a ton of one-sentence paragraphs. Totally agree that it should be consistent! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks I guess not sure since some have two sentences? If you prefer no periods, prob better to just leave it as it was... periods for the two sentences, no punctuation for the others... |
||
}, | ||
{ | ||
title: 'Babel 7', | ||
content: | ||
'Babel 7 transpiles your code faster than ever, now with support for the new Fragment syntax `</>`', | ||
}, | ||
{ | ||
title: 'ES2015+', | ||
content: | ||
'Create React App is set up for you to use the features of the future', | ||
}, | ||
{ | ||
title: 'Jest', | ||
content: | ||
'The best test runner in the business is set up for you by default', | ||
}, | ||
{ | ||
title: 'Dev-server', | ||
content: | ||
'No-hassle local development thanks to the built-in dev-server', | ||
}, | ||
{ | ||
title: 'PostCSS', | ||
content: | ||
'Prefixing of new CSS features are done for you through Autoprefixer', | ||
}, | ||
{ | ||
title: 'SASS', | ||
content: 'Now you can write your styles with the power of SASS', | ||
}, | ||
{ | ||
title: 'CSS Modules', | ||
content: 'CSS Modules are also supported out of the box', | ||
}, | ||
{ | ||
title: 'Babel Macros', | ||
content: | ||
'Need some extra Babel-power? Babel Macros gives you just that!', | ||
}, | ||
{ | ||
title: 'SVGs in React', | ||
content: | ||
'Now you can import your SVGs and use them as React components', | ||
}, | ||
{ | ||
title: 'Progressive Web Apps', | ||
content: | ||
'Every app created by Create React App is a fully Lighthouse-compliant PWA - opt in.', | ||
}, | ||
{ | ||
title: 'Great DX', | ||
content: | ||
"Create React App is made for you - the developer. And we've made your day-to-day so much better", | ||
}, | ||
]} | ||
</Block> | ||
); | ||
|
||
class Index extends React.Component { | ||
render() { | ||
const language = this.props.language || ''; | ||
|
@@ -127,7 +240,10 @@ class Index extends React.Component { | |
<div> | ||
<HomeSplash language={language} /> | ||
<div className="mainContainer"> | ||
<Features /> | ||
<Features align="center" /> | ||
<GetStarted align="left" /> | ||
<Update align="left" /> | ||
<FineGrainedFeatures align="center" /> | ||
</div> | ||
</div> | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can tweak the CSS so the left hand side margin isn't so large in
code
blocks, what do you think?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure I'll try to tune it down a bit :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that's actually indentation - I'll just remove the indentation and we should be good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, yeah it seemed not as large in the
.md
files.How did you generate https://create-react-app-stngeqjqos.now.sh/? When poking around, I followed this and pulled your branch locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use now from zeit - it's free and pretty easy to use. Once you've installed their CLI and logged in, you can do something like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'll have to check that out, and carbon too