Skip to content
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

Merged
merged 7 commits into from
Oct 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 126 additions & 6 deletions docusaurus/website/pages/en/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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:
Expand All @@ -119,6 +128,114 @@ 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.

\`\`\`sh
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**.

\`\`\`sh
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',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider punctuation (e.g. add periods) throughout to be consistent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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!

Copy link
Contributor

Choose a reason for hiding this comment

The 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 || '';
Expand All @@ -127,7 +244,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>
);
Expand Down
7 changes: 7 additions & 0 deletions docusaurus/website/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,17 @@
text-decoration: underline;
}

.navigationSlider .slidingNav ul {
background: #282c34;
}

@media only screen and (min-device-width: 360px) and (max-device-width: 736px) {
}

@media only screen and (min-width: 1024px) {
.navigationSlider .slidingNav ul {
background: none;
}
}

@media only screen and (max-width: 1023px) {
Expand Down
Binary file added docusaurus/website/static/img/update.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.