From c56ef041865cf59afc524a958eb25eb5f7bb610e Mon Sep 17 00:00:00 2001 From: Kristofer Selbekk Date: Tue, 2 Oct 2018 14:55:18 +0200 Subject: [PATCH 1/3] Remove "who uses this" callout on front page --- website/pages/en/index.js | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/website/pages/en/index.js b/website/pages/en/index.js index 62f284c8a46..2e13392c351 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -95,7 +95,8 @@ const Block = props => ( + background={props.background} + > ); @@ -122,7 +123,8 @@ const Features = () => ( const FeatureCallout = () => (
+ style={{ textAlign: 'center' }} + >

Feature Callout

These are features of this project
@@ -167,31 +169,6 @@ const Description = () => ( ); -const Showcase = props => { - if ((siteConfig.users || []).length === 0) { - return null; - } - - const showcase = siteConfig.users.filter(user => user.pinned).map(user => ( - - {user.caption} - - )); - - return ( -
-

Who is Using This?

-

This project is used by all these people

-
{showcase}
-
- - More {siteConfig.title} Users - -
-
- ); -}; - class Index extends React.Component { render() { const language = this.props.language || ''; @@ -205,7 +182,6 @@ class Index extends React.Component { - ); From 3c04d5224fa335200be09e8a565c8047993c8afd Mon Sep 17 00:00:00 2001 From: Kristofer Selbekk Date: Tue, 2 Oct 2018 14:56:24 +0200 Subject: [PATCH 2/3] Remove users and help pages --- website/core/Footer.js | 15 +++++----- website/i18n/en.json | 3 +- website/pages/en/help.js | 58 --------------------------------------- website/pages/en/users.js | 49 --------------------------------- website/siteConfig.js | 21 +------------- 5 files changed, 10 insertions(+), 136 deletions(-) delete mode 100755 website/pages/en/help.js delete mode 100644 website/pages/en/users.js diff --git a/website/core/Footer.js b/website/core/Footer.js index 9fc4331c40a..7e08f80efb4 100644 --- a/website/core/Footer.js +++ b/website/core/Footer.js @@ -46,20 +46,19 @@ class Footer extends React.Component { @@ -73,7 +72,8 @@ class Footer extends React.Component { data-count-href="/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" - aria-label="Star this project on GitHub"> + aria-label="Star this project on GitHub" + > Star @@ -83,7 +83,8 @@ class Footer extends React.Component { href="https://code.facebook.com/projects/" target="_blank" rel="noreferrer noopener" - className="fbOpenSource"> + className="fbOpenSource" + > Facebook Open Source - -
-
-

Need help?

-
-

This project is maintained by a dedicated group of people.

- -
-
- - ); - } -} - -module.exports = Help; diff --git a/website/pages/en/users.js b/website/pages/en/users.js deleted file mode 100644 index b03fb812add..00000000000 --- a/website/pages/en/users.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -const CompLibrary = require('../../core/CompLibrary.js'); - -const Container = CompLibrary.Container; - -const siteConfig = require(`${process.cwd()}/siteConfig.js`); - -class Users extends React.Component { - render() { - if ((siteConfig.users || []).length === 0) { - return null; - } - - const editUrl = `${siteConfig.repoUrl}/edit/master/website/siteConfig.js`; - const showcase = siteConfig.users.map(user => ( - - {user.caption} - - )); - - return ( -
- -
-
-

Who is Using This?

-

This project is used by many folks

-
-
{showcase}
-

Are you using this project?

- - Add your company - -
-
-
- ); - } -} - -module.exports = Users; diff --git a/website/siteConfig.js b/website/siteConfig.js index f46c4f10641..c09b2fe433b 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -8,18 +8,6 @@ // See https://docusaurus.io/docs/site-config for all the possible // site configuration options. -// List of projects/orgs using your project for the users page. -const users = [ - { - caption: 'User1', - // You will need to prepend the image path with your baseUrl - // if it is not '/', like: '/test-site/img/docusaurus.svg'. - image: '/img/docusaurus.svg', - infoLink: 'https://www.facebook.com', - pinned: true, - }, -]; - const siteConfig = { title: 'Test Site', // Title for your website. tagline: 'A website for testing', @@ -37,14 +25,7 @@ const siteConfig = { // organizationName: 'JoelMarcey' // For no header links in the top nav bar -> headerLinks: [], - headerLinks: [ - {doc: 'doc1', label: 'Docs'}, - {doc: 'doc4', label: 'API'}, - {page: 'help', label: 'Help'}, - ], - - // If you have users set above, you add it here: - users, + headerLinks: [{ doc: 'doc1', label: 'Docs' }, { doc: 'doc4', label: 'API' }], /* path to images for header/footer */ headerIcon: 'img/docusaurus.svg', From 32c761faa6e3f2bb95fcccd8ce5e078261b9059d Mon Sep 17 00:00:00 2001 From: Kristofer Selbekk Date: Tue, 2 Oct 2018 15:20:55 +0200 Subject: [PATCH 3/3] Add link to React's support docs Instead of removing the Help link altogether, this commit re-adds it as an external link to React's existing support documentation --- website/i18n/en.json | 3 ++- website/siteConfig.js | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/website/i18n/en.json b/website/i18n/en.json index 4d34591f692..0cb4db34b0b 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -24,7 +24,8 @@ }, "links": { "Docs": "Docs", - "API": "API" + "API": "API", + "Help": "Help" }, "categories": { "Docusaurus": "Docusaurus", diff --git a/website/siteConfig.js b/website/siteConfig.js index c09b2fe433b..eea214bbf7a 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -25,7 +25,11 @@ const siteConfig = { // organizationName: 'JoelMarcey' // For no header links in the top nav bar -> headerLinks: [], - headerLinks: [{ doc: 'doc1', label: 'Docs' }, { doc: 'doc4', label: 'API' }], + headerLinks: [ + { doc: 'doc1', label: 'Docs' }, + { doc: 'doc4', label: 'API' }, + { href: 'https://reactjs.org/community/support.html', label: 'Help' }, + ], /* path to images for header/footer */ headerIcon: 'img/docusaurus.svg',