mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
Run Prettier
This commit is contained in:
parent
73c6da0b8f
commit
ef8ee5bf6c
1 changed files with 31 additions and 42 deletions
|
@ -42,41 +42,36 @@ Button.defaultProps = {
|
|||
target: '_self',
|
||||
};
|
||||
|
||||
const SplashContainer = (props) => (
|
||||
const SplashContainer = props => (
|
||||
<div className="homeContainer">
|
||||
<div className="homeSplashFade">
|
||||
<div className="wrapper homeWrapper">
|
||||
{props.children}
|
||||
</div>
|
||||
<div className="wrapper homeWrapper">{props.children}</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
|
||||
const Logo = (props) => (
|
||||
const Logo = props => (
|
||||
<div className="projectLogo">
|
||||
<img src={props.img_src} />
|
||||
</div>
|
||||
)
|
||||
);
|
||||
|
||||
const ProjectTitle = (props) => (
|
||||
const ProjectTitle = props => (
|
||||
<h2 className="projectTitle">
|
||||
{siteConfig.title}
|
||||
<small>{siteConfig.tagline}</small>
|
||||
</h2>
|
||||
)
|
||||
);
|
||||
|
||||
const PromoSection = (props) => (
|
||||
const PromoSection = props => (
|
||||
<div className="section promoSection">
|
||||
<div className="promoRow">
|
||||
<div className="pluginRowBlock">
|
||||
{props.children}
|
||||
</div>
|
||||
<div className="pluginRowBlock">{props.children}</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
|
||||
class HomeSplash extends React.Component {
|
||||
|
||||
render() {
|
||||
let language = this.props.language || 'en';
|
||||
return (
|
||||
|
@ -86,12 +81,8 @@ class HomeSplash extends React.Component {
|
|||
<ProjectTitle />
|
||||
<PromoSection>
|
||||
<Button href="#try">Try It Out</Button>
|
||||
<Button href={docUrl('doc1.html', language)}>
|
||||
Example Link
|
||||
</Button>
|
||||
<Button href={docUrl('doc2.html', language)}>
|
||||
Example Link 2
|
||||
</Button>
|
||||
<Button href={docUrl('doc1.html', language)}>Example Link</Button>
|
||||
<Button href={docUrl('doc2.html', language)}>Example Link 2</Button>
|
||||
</PromoSection>
|
||||
</div>
|
||||
</SplashContainer>
|
||||
|
@ -99,17 +90,16 @@ class HomeSplash extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
const Block = (props) => (
|
||||
<Container padding={['bottom', 'top']} id={props.id} background={props.background}>
|
||||
<GridBlock
|
||||
align="center"
|
||||
contents={props.children}
|
||||
layout={props.layout}
|
||||
/>
|
||||
const Block = props => (
|
||||
<Container
|
||||
padding={['bottom', 'top']}
|
||||
id={props.id}
|
||||
background={props.background}>
|
||||
<GridBlock align="center" contents={props.children} layout={props.layout} />
|
||||
</Container>
|
||||
);
|
||||
|
||||
const Features = (props) => (
|
||||
const Features = props => (
|
||||
<Block layout="fourColumn">
|
||||
{[
|
||||
{
|
||||
|
@ -128,16 +118,16 @@ const Features = (props) => (
|
|||
</Block>
|
||||
);
|
||||
|
||||
const FeatureCallout = (props) => (
|
||||
const FeatureCallout = props => (
|
||||
<div
|
||||
className="productShowcaseSection paddingBottom"
|
||||
style={{textAlign: 'center'}}>
|
||||
<h2>Feature Callout</h2>
|
||||
<MarkdownBlock>These are features of this project</MarkdownBlock>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
|
||||
const LearnHow = (props) => (
|
||||
const LearnHow = props => (
|
||||
<Block background="light">
|
||||
{[
|
||||
{
|
||||
|
@ -148,9 +138,9 @@ const LearnHow = (props) => (
|
|||
},
|
||||
]}
|
||||
</Block>
|
||||
)
|
||||
);
|
||||
|
||||
const TryOut = (props) => (
|
||||
const TryOut = props => (
|
||||
<Block id="try">
|
||||
{[
|
||||
{
|
||||
|
@ -161,23 +151,22 @@ const TryOut = (props) => (
|
|||
},
|
||||
]}
|
||||
</Block>
|
||||
)
|
||||
);
|
||||
|
||||
const Description = (props) => (
|
||||
const Description = props => (
|
||||
<Block background="dark">
|
||||
{[
|
||||
{
|
||||
content:
|
||||
'This is another description of how this project is useful',
|
||||
content: 'This is another description of how this project is useful',
|
||||
image: imgUrl('docusaurus.svg'),
|
||||
imageAlign: 'right',
|
||||
title: 'Description',
|
||||
},
|
||||
]}
|
||||
</Block>
|
||||
)
|
||||
);
|
||||
|
||||
const Showcase = (props) => {
|
||||
const Showcase = props => {
|
||||
const showcase = siteConfig.users
|
||||
.filter(user => {
|
||||
return user.pinned;
|
||||
|
@ -201,8 +190,8 @@ const Showcase = (props) => {
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
class Index extends React.Component {
|
||||
render() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue