Skip to content

Commit

Permalink
Removing sample pages (#5242)
Browse files Browse the repository at this point in the history
* Remove "who uses this" callout on front page

* Remove users and help pages

* 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
  • Loading branch information
selbekk authored and Timer committed Oct 2, 2018
1 parent 2a2e8bf commit d58253d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 158 deletions.
15 changes: 8 additions & 7 deletions website/core/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,19 @@ class Footer extends React.Component {
</div>
<div>
<h5>Community</h5>
<a href={this.pageUrl('users.html', this.props.language)}>
User Showcase
</a>
<a
href="http://stackoverflow.com/questions/tagged/"
target="_blank"
rel="noreferrer noopener">
rel="noreferrer noopener"
>
Stack Overflow
</a>
<a href="https://discordapp.com/">Project Chat</a>
<a
href="https://twitter.com/"
target="_blank"
rel="noreferrer noopener">
rel="noreferrer noopener"
>
Twitter
</a>
</div>
Expand All @@ -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
</a>
</div>
Expand All @@ -83,7 +83,8 @@ class Footer extends React.Component {
href="https://code.facebook.com/projects/"
target="_blank"
rel="noreferrer noopener"
className="fbOpenSource">
className="fbOpenSource"
>
<img
src={`${this.props.config.baseUrl}img/oss_logo.png`}
alt="Facebook Open Source"
Expand Down
58 changes: 0 additions & 58 deletions website/pages/en/help.js

This file was deleted.

32 changes: 4 additions & 28 deletions website/pages/en/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ const Block = props => (
<Container
padding={['bottom', 'top']}
id={props.id}
background={props.background}>
background={props.background}
>
<GridBlock align="center" contents={props.children} layout={props.layout} />
</Container>
);
Expand All @@ -122,7 +123,8 @@ const Features = () => (
const FeatureCallout = () => (
<div
className="productShowcaseSection paddingBottom"
style={{textAlign: 'center'}}>
style={{ textAlign: 'center' }}
>
<h2>Feature Callout</h2>
<MarkdownBlock>These are features of this project</MarkdownBlock>
</div>
Expand Down Expand Up @@ -167,31 +169,6 @@ const Description = () => (
</Block>
);

const Showcase = props => {
if ((siteConfig.users || []).length === 0) {
return null;
}

const showcase = siteConfig.users.filter(user => user.pinned).map(user => (
<a href={user.infoLink} key={user.infoLink}>
<img src={user.image} alt={user.caption} title={user.caption} />
</a>
));

return (
<div className="productShowcaseSection paddingBottom">
<h2>Who is Using This?</h2>
<p>This project is used by all these people</p>
<div className="logos">{showcase}</div>
<div className="more-users">
<a className="button" href={pageUrl('users.html', props.language)}>
More {siteConfig.title} Users
</a>
</div>
</div>
);
};

class Index extends React.Component {
render() {
const language = this.props.language || '';
Expand All @@ -205,7 +182,6 @@ class Index extends React.Component {
<LearnHow />
<TryOut />
<Description />
<Showcase language={language} />
</div>
</div>
);
Expand Down
49 changes: 0 additions & 49 deletions website/pages/en/users.js

This file was deleted.

17 changes: 1 addition & 16 deletions website/siteConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: 'Create React App', // Title for your website.
tagline: 'Create React apps with no build configuration.',
Expand All @@ -40,12 +28,9 @@ const siteConfig = {
headerLinks: [
{ doc: 'doc1', label: 'Docs' },
{ doc: 'doc4', label: 'API' },
{ page: 'help', label: 'Help' },
{ href: 'https://reactjs.org/community/support.html', label: 'Help' },
],

// If you have users set above, you add it here:
users,

/* path to images for header/footer */
headerIcon: 'img/docusaurus.svg',
footerIcon: 'img/docusaurus.svg',
Expand Down

0 comments on commit d58253d

Please sign in to comment.