Skip to content

Commit

Permalink
Merge pull request #5341 from selbekk/add-callouts-and-logo
Browse files Browse the repository at this point in the history
Add callouts and logo
  • Loading branch information
selbekk authored Oct 8, 2018
2 parents c2a163a + ca49a97 commit bc1b021
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 71 deletions.
3 changes: 2 additions & 1 deletion docusaurus/website/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
},
"links": {
"Getting started": "Getting started",
"Help": "Help"
"Help": "Help",
"GitHub": "GitHub"
},
"categories": {
"Getting Started": "Getting Started",
Expand Down
77 changes: 11 additions & 66 deletions docusaurus/website/pages/en/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const React = require('react');

const CompLibrary = require('../../core/CompLibrary.js');

const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
const Container = CompLibrary.Container;
const GridBlock = CompLibrary.GridBlock;

Expand All @@ -23,10 +22,6 @@ function docUrl(doc, language) {
return `${siteConfig.baseUrl}docs/${language ? `${language}/` : ''}${doc}`;
}

function pageUrl(page, language) {
return siteConfig.baseUrl + (language ? `${language}/` : '') + page;
}

class Button extends React.Component {
render() {
return (
Expand Down Expand Up @@ -77,7 +72,7 @@ class HomeSplash extends React.Component {
const language = this.props.language || '';
return (
<SplashContainer>
<Logo img_src={imgUrl('docusaurus.svg')} />
<Logo img_src={imgUrl('logo.svg')} />
<div className="inner">
<ProjectTitle />
<PromoSection>
Expand All @@ -104,68 +99,22 @@ const Block = props => (
);

const Features = () => (
<Block layout="fourColumn">
<Block layout="threeColumn" align="left">
{[
{
content: 'This is the content of my feature',
image: imgUrl('docusaurus.svg'),
imageAlign: 'top',
title: 'Feature One',
},
{
content: 'The content of my second feature',
image: imgUrl('docusaurus.svg'),
imageAlign: 'top',
title: 'Feature Two',
content:
'There is just one build dependency. It uses Webpack, Babel, ESLint, and other amazing projects, but provides a cohesive curated experience on top of them.',
title: 'One dependency',
},
]}
</Block>
);

const FeatureCallout = () => (
<div
className="productShowcaseSection paddingBottom"
style={{ textAlign: 'center' }}
>
<h2>Feature Callout</h2>
<MarkdownBlock>These are features of this project</MarkdownBlock>
</div>
);

const LearnHow = () => (
<Block background="light">
{[
{
content: 'Talk about learning how to use this',
image: imgUrl('docusaurus.svg'),
imageAlign: 'right',
title: 'Learn How',
content:
"You don't need to configure anything. Reasonably good configuration of both development and production builds is handled for you so you can focus on writing code.",
title: 'No configuration required',
},
]}
</Block>
);

const TryOut = () => (
<Block id="try">
{[
{
content: 'Talk about trying this out',
image: imgUrl('docusaurus.svg'),
imageAlign: 'left',
title: 'Try it Out',
},
]}
</Block>
);

const Description = () => (
<Block background="dark">
{[
{
content: 'This is another description of how this project is useful',
image: imgUrl('docusaurus.svg'),
imageAlign: 'right',
title: 'Description',
content:
'You can “eject” to a custom setup at any time. Run a single command, and all the configuration and build dependencies will be moved directly into your project, so you can pick up right where you left off.',
title: 'No lock-in',
},
]}
</Block>
Expand All @@ -180,10 +129,6 @@ class Index extends React.Component {
<HomeSplash language={language} />
<div className="mainContainer">
<Features />
<FeatureCallout />
<LearnHow />
<TryOut />
<Description />
</div>
</div>
);
Expand Down
9 changes: 6 additions & 3 deletions docusaurus/website/siteConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ const siteConfig = {
headerLinks: [
{ doc: 'getting-started', label: 'Getting started' },
{ href: 'https://reactjs.org/community/support.html', label: 'Help' },
{ href: 'https://www.github.com/facebook/create-react-app', label: 'GitHub' },
{
href: 'https://www.github.com/facebook/create-react-app',
label: 'GitHub',
},
],

/* path to images for header/footer */
headerIcon: 'img/docusaurus.svg',
footerIcon: 'img/docusaurus.svg',
headerIcon: 'img/logo.svg',
footerIcon: 'img/logo.svg',
favicon: 'img/favicon/favicon.ico',

/* Colors for website */
Expand Down
17 changes: 16 additions & 1 deletion docusaurus/website/static/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
/* your custom css */

.homeContainer {
background: #282c34;
color: white;
padding: 80px 0;
}

.homeContainer .button {
background: #24292e;
border-color: white;
}

.homeContainer * {
color: inherit;
}

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

Expand All @@ -13,4 +28,4 @@
}

@media only screen and (min-width: 1500px) {
}
}
7 changes: 7 additions & 0 deletions docusaurus/website/static/img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bc1b021

Please sign in to comment.