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