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
a7b5148e06
commit
fbae29b0ff
29 changed files with 1311 additions and 987 deletions
|
@ -7,11 +7,11 @@
|
|||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
const React = require('react');
|
||||
const Container = require('./Container.js');
|
||||
const Doc = require('./Doc.js');
|
||||
const DocsSidebar = require('./DocsSidebar.js');
|
||||
const Site = require('./Site.js');
|
||||
const React = require("react");
|
||||
const Container = require("./Container.js");
|
||||
const Doc = require("./Doc.js");
|
||||
const DocsSidebar = require("./DocsSidebar.js");
|
||||
const Site = require("./Site.js");
|
||||
|
||||
class DocsLayout extends React.Component {
|
||||
render() {
|
||||
|
@ -24,11 +24,13 @@ class DocsLayout extends React.Component {
|
|||
className="sideNavVisible"
|
||||
section="docs"
|
||||
title={
|
||||
i18n ? this.props.config[this.props.metadata.language]['localized-strings'][
|
||||
this.props.metadata.localized_id
|
||||
] || this.props.metadata.title : this.props.metadata.title
|
||||
i18n
|
||||
? this.props.config[this.props.metadata.language][
|
||||
"localized-strings"
|
||||
][this.props.metadata.localized_id] || this.props.metadata.title
|
||||
: this.props.metadata.title
|
||||
}
|
||||
description={content.trim().split('\n')[0]}
|
||||
description={content.trim().split("\n")[0]}
|
||||
language={metadata.language}
|
||||
>
|
||||
<div className="docMainWrapper wrapper">
|
||||
|
@ -39,9 +41,12 @@ class DocsLayout extends React.Component {
|
|||
config={this.props.config}
|
||||
source={metadata.source}
|
||||
title={
|
||||
i18n ? this.props.config[this.props.metadata.language]['localized-strings'][
|
||||
this.props.metadata.localized_id
|
||||
] || this.props.metadata.title : this.props.metadata.title
|
||||
i18n
|
||||
? this.props.config[this.props.metadata.language][
|
||||
"localized-strings"
|
||||
][this.props.metadata.localized_id] ||
|
||||
this.props.metadata.title
|
||||
: this.props.metadata.title
|
||||
}
|
||||
language={metadata.language}
|
||||
/>
|
||||
|
@ -49,27 +54,25 @@ class DocsLayout extends React.Component {
|
|||
{metadata.previous_id &&
|
||||
<a
|
||||
className="docs-prev button"
|
||||
href={metadata.previous_id + '.html#content'}
|
||||
href={metadata.previous_id + ".html#content"}
|
||||
>
|
||||
←
|
||||
{' '}
|
||||
{
|
||||
i18n ? this.props.config[this.props.metadata.language][
|
||||
'localized-strings'
|
||||
]['previous'] || 'Previous' : 'Previous'
|
||||
}
|
||||
←{" "}
|
||||
{i18n
|
||||
? this.props.config[this.props.metadata.language][
|
||||
"localized-strings"
|
||||
]["previous"] || "Previous"
|
||||
: "Previous"}
|
||||
</a>}
|
||||
{metadata.next_id &&
|
||||
<a
|
||||
className="docs-next button"
|
||||
href={metadata.next_id + '.html#content'}
|
||||
href={metadata.next_id + ".html#content"}
|
||||
>
|
||||
{
|
||||
i18n ? this.props.config[this.props.metadata.language][
|
||||
'localized-strings'
|
||||
]['next'] || 'Next' : 'Next'
|
||||
}
|
||||
{' '}
|
||||
{i18n
|
||||
? this.props.config[this.props.metadata.language][
|
||||
"localized-strings"
|
||||
]["next"] || "Next"
|
||||
: "Next"}{" "}
|
||||
→
|
||||
</a>}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue