mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 19:03:38 +02:00
Add Prettier Formatting (#258)
* Add Prettier formatting to source files and example files, and check that Prettier formatting is maintained on PRs * Remove trailing-comma as we are using Node 6 on Circle * Use latest Node 6 LTS version in Circle * Remove unused test
This commit is contained in:
parent
0cead4b6f9
commit
65421db62e
50 changed files with 1376 additions and 1350 deletions
|
@ -5,7 +5,7 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const React = require("react");
|
||||
const React = require('react');
|
||||
|
||||
class Footer extends React.Component {
|
||||
render() {
|
||||
|
@ -26,31 +26,28 @@ class Footer extends React.Component {
|
|||
<a
|
||||
href={
|
||||
this.props.config.baseUrl +
|
||||
"docs/" +
|
||||
'docs/' +
|
||||
this.props.language +
|
||||
"/doc1.html"
|
||||
}
|
||||
>
|
||||
'/doc1.html'
|
||||
}>
|
||||
Getting Started (or other categories)
|
||||
</a>
|
||||
<a
|
||||
href={
|
||||
this.props.config.baseUrl +
|
||||
"docs/" +
|
||||
'docs/' +
|
||||
this.props.language +
|
||||
"/doc2.html"
|
||||
}
|
||||
>
|
||||
'/doc2.html'
|
||||
}>
|
||||
Guides (or other categories)
|
||||
</a>
|
||||
<a
|
||||
href={
|
||||
this.props.config.baseUrl +
|
||||
"docs/" +
|
||||
'docs/' +
|
||||
this.props.language +
|
||||
"/doc3.html"
|
||||
}
|
||||
>
|
||||
'/doc3.html'
|
||||
}>
|
||||
API Reference (or other categories)
|
||||
</a>
|
||||
</div>
|
||||
|
@ -58,15 +55,13 @@ class Footer extends React.Component {
|
|||
<h5>Community</h5>
|
||||
<a
|
||||
href={
|
||||
this.props.config.baseUrl + this.props.language + "/users.html"
|
||||
}
|
||||
>
|
||||
this.props.config.baseUrl + this.props.language + '/users.html'
|
||||
}>
|
||||
User Showcase
|
||||
</a>
|
||||
<a
|
||||
href="http://stackoverflow.com/questions/tagged/"
|
||||
target="_blank"
|
||||
>
|
||||
target="_blank">
|
||||
Stack Overflow
|
||||
</a>
|
||||
<a href="https://discordapp.com/">Project Chat</a>
|
||||
|
@ -76,28 +71,27 @@ class Footer extends React.Component {
|
|||
</div>
|
||||
<div>
|
||||
<h5>More</h5>
|
||||
<a href={this.props.config.baseUrl + "blog"}>Blog</a>
|
||||
<a href={this.props.config.baseUrl + 'blog'}>Blog</a>
|
||||
<a href="https://github.com/">GitHub</a>
|
||||
<a className="github-button"
|
||||
<a
|
||||
className="github-button"
|
||||
href={this.props.config.repoUrl}
|
||||
data-icon="octicon-star"
|
||||
data-count-href="/deltice/test-site/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>
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<a
|
||||
href="https://code.facebook.com/projects/"
|
||||
target="_blank"
|
||||
className="fbOpenSource"
|
||||
>
|
||||
className="fbOpenSource">
|
||||
<img
|
||||
src={this.props.config.baseUrl + "img/oss_logo.png"}
|
||||
src={this.props.config.baseUrl + 'img/oss_logo.png'}
|
||||
alt="Facebook Open Source"
|
||||
width="170"
|
||||
height="45"
|
||||
|
|
|
@ -5,31 +5,30 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const React = require("react");
|
||||
const React = require('react');
|
||||
|
||||
const CompLibrary = require("../../core/CompLibrary.js");
|
||||
const CompLibrary = require('../../core/CompLibrary.js');
|
||||
const Container = CompLibrary.Container;
|
||||
const GridBlock = CompLibrary.GridBlock;
|
||||
|
||||
const siteConfig = require(process.cwd() + "/siteConfig.js");
|
||||
const siteConfig = require(process.cwd() + '/siteConfig.js');
|
||||
|
||||
class Help extends React.Component {
|
||||
|
||||
render() {
|
||||
const supportLinks = [
|
||||
{
|
||||
content:
|
||||
"Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)",
|
||||
title: "Browse Docs"
|
||||
'Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)',
|
||||
title: 'Browse Docs',
|
||||
},
|
||||
{
|
||||
content: "Ask questions about the documentation and project",
|
||||
title: "Join the community"
|
||||
content: 'Ask questions about the documentation and project',
|
||||
title: 'Join the community',
|
||||
},
|
||||
{
|
||||
content: "Find out what's new with this project",
|
||||
title: "Stay up to date"
|
||||
}
|
||||
title: 'Stay up to date',
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const React = require("react");
|
||||
const React = require('react');
|
||||
|
||||
const CompLibrary = require("../../core/CompLibrary.js");
|
||||
const CompLibrary = require('../../core/CompLibrary.js');
|
||||
const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
|
||||
const Container = CompLibrary.Container;
|
||||
const GridBlock = CompLibrary.GridBlock;
|
||||
|
||||
const siteConfig = require(process.cwd() + "/siteConfig.js");
|
||||
const siteConfig = require(process.cwd() + '/siteConfig.js');
|
||||
|
||||
class Button extends React.Component {
|
||||
render() {
|
||||
|
@ -27,7 +27,7 @@ class Button extends React.Component {
|
|||
}
|
||||
|
||||
Button.defaultProps = {
|
||||
target: "_self"
|
||||
target: '_self',
|
||||
};
|
||||
|
||||
class HomeSplash extends React.Component {
|
||||
|
@ -37,14 +37,12 @@ class HomeSplash extends React.Component {
|
|||
<div className="homeSplashFade">
|
||||
<div className="wrapper homeWrapper">
|
||||
<div className="projectLogo">
|
||||
<img src={siteConfig.baseUrl + "img/docusaurus.svg"} />
|
||||
<img src={siteConfig.baseUrl + 'img/docusaurus.svg'} />
|
||||
</div>
|
||||
<div className="inner">
|
||||
<h2 className="projectTitle">
|
||||
{siteConfig.title}
|
||||
<small>
|
||||
{siteConfig.tagline}
|
||||
</small>
|
||||
<small>{siteConfig.tagline}</small>
|
||||
</h2>
|
||||
<div className="section promoSection">
|
||||
<div className="promoRow">
|
||||
|
@ -53,21 +51,19 @@ class HomeSplash extends React.Component {
|
|||
<Button
|
||||
href={
|
||||
siteConfig.baseUrl +
|
||||
"docs/" +
|
||||
'docs/' +
|
||||
this.props.language +
|
||||
"/doc1.html"
|
||||
}
|
||||
>
|
||||
'/doc1.html'
|
||||
}>
|
||||
Example Link
|
||||
</Button>
|
||||
<Button
|
||||
href={
|
||||
siteConfig.baseUrl +
|
||||
"docs/" +
|
||||
'docs/' +
|
||||
this.props.language +
|
||||
"/doc2.html"
|
||||
}
|
||||
>
|
||||
'/doc2.html'
|
||||
}>
|
||||
Example Link 2
|
||||
</Button>
|
||||
</div>
|
||||
|
@ -83,7 +79,7 @@ class HomeSplash extends React.Component {
|
|||
|
||||
class Index extends React.Component {
|
||||
render() {
|
||||
let language = this.props.language || "en";
|
||||
let language = this.props.language || 'en';
|
||||
const showcase = siteConfig.users
|
||||
.filter(user => {
|
||||
return user.pinned;
|
||||
|
@ -100,22 +96,22 @@ class Index extends React.Component {
|
|||
<div>
|
||||
<HomeSplash language={language} />
|
||||
<div className="mainContainer">
|
||||
<Container padding={["bottom", "top"]}>
|
||||
<Container padding={['bottom', 'top']}>
|
||||
<GridBlock
|
||||
align="center"
|
||||
contents={[
|
||||
{
|
||||
content: "This is the content of my feature",
|
||||
image: siteConfig.baseUrl + "img/docusaurus.svg",
|
||||
imageAlign: "top",
|
||||
title: "Feature One"
|
||||
content: 'This is the content of my feature',
|
||||
image: siteConfig.baseUrl + 'img/docusaurus.svg',
|
||||
imageAlign: 'top',
|
||||
title: 'Feature One',
|
||||
},
|
||||
{
|
||||
content: "The content of my second feature",
|
||||
image: siteConfig.baseUrl + "img/docusaurus.svg",
|
||||
imageAlign: "top",
|
||||
title: "Feature Two"
|
||||
}
|
||||
content: 'The content of my second feature',
|
||||
image: siteConfig.baseUrl + 'img/docusaurus.svg',
|
||||
imageAlign: 'top',
|
||||
title: 'Feature Two',
|
||||
},
|
||||
]}
|
||||
layout="fourColumn"
|
||||
/>
|
||||
|
@ -123,67 +119,61 @@ class Index extends React.Component {
|
|||
|
||||
<div
|
||||
className="productShowcaseSection paddingBottom"
|
||||
style={{ textAlign: "center" }}
|
||||
>
|
||||
style={{textAlign: 'center'}}>
|
||||
<h2>Feature Callout</h2>
|
||||
<MarkdownBlock>These are features of this project</MarkdownBlock>
|
||||
</div>
|
||||
|
||||
<Container padding={["bottom", "top"]} background="light">
|
||||
<Container padding={['bottom', 'top']} background="light">
|
||||
<GridBlock
|
||||
contents={[
|
||||
{
|
||||
content: "Talk about learning how to use this",
|
||||
image: siteConfig.baseUrl + "img/docusaurus.svg",
|
||||
imageAlign: "right",
|
||||
title: "Learn How"
|
||||
}
|
||||
content: 'Talk about learning how to use this',
|
||||
image: siteConfig.baseUrl + 'img/docusaurus.svg',
|
||||
imageAlign: 'right',
|
||||
title: 'Learn How',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Container>
|
||||
|
||||
<Container padding={["bottom", "top"]} id="try">
|
||||
<Container padding={['bottom', 'top']} id="try">
|
||||
<GridBlock
|
||||
contents={[
|
||||
{
|
||||
content: "Talk about trying this out",
|
||||
image: siteConfig.baseUrl + "img/docusaurus.svg",
|
||||
imageAlign: "left",
|
||||
title: "Try it Out"
|
||||
}
|
||||
content: 'Talk about trying this out',
|
||||
image: siteConfig.baseUrl + 'img/docusaurus.svg',
|
||||
imageAlign: 'left',
|
||||
title: 'Try it Out',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Container>
|
||||
|
||||
<Container padding={["bottom", "top"]} background="dark">
|
||||
<Container padding={['bottom', 'top']} background="dark">
|
||||
<GridBlock
|
||||
contents={[
|
||||
{
|
||||
content:
|
||||
"This is another description of how this project is useful",
|
||||
image: siteConfig.baseUrl + "img/docusaurus.svg",
|
||||
imageAlign: "right",
|
||||
title: "Description"
|
||||
}
|
||||
'This is another description of how this project is useful',
|
||||
image: siteConfig.baseUrl + 'img/docusaurus.svg',
|
||||
imageAlign: 'right',
|
||||
title: 'Description',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Container>
|
||||
|
||||
<div className="productShowcaseSection paddingBottom">
|
||||
<h2>
|
||||
{"Who's Using This?"}
|
||||
</h2>
|
||||
<h2>{"Who's Using This?"}</h2>
|
||||
<p>This project is used by all these people</p>
|
||||
<div className="logos">
|
||||
{showcase}
|
||||
</div>
|
||||
<div className="logos">{showcase}</div>
|
||||
<div className="more-users">
|
||||
<a
|
||||
className="button"
|
||||
href={
|
||||
siteConfig.baseUrl + this.props.language + "/" + "users.html"
|
||||
}
|
||||
>
|
||||
siteConfig.baseUrl + this.props.language + '/' + 'users.html'
|
||||
}>
|
||||
More {siteConfig.title} Users
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const React = require("react");
|
||||
const React = require('react');
|
||||
|
||||
const CompLibrary = require("../../core/CompLibrary.js");
|
||||
const CompLibrary = require('../../core/CompLibrary.js');
|
||||
const Container = CompLibrary.Container;
|
||||
|
||||
const siteConfig = require(process.cwd() + "/siteConfig.js");
|
||||
const siteConfig = require(process.cwd() + '/siteConfig.js');
|
||||
|
||||
class Users extends React.Component {
|
||||
render() {
|
||||
|
@ -24,7 +24,7 @@ class Users extends React.Component {
|
|||
|
||||
return (
|
||||
<div className="mainContainer">
|
||||
<Container padding={["bottom", "top"]}>
|
||||
<Container padding={['bottom', 'top']}>
|
||||
<div className="showcaseSection">
|
||||
<div className="prose">
|
||||
<h1>Who's Using This?</h1>
|
||||
|
|
|
@ -8,49 +8,47 @@
|
|||
/* List of projects/orgs using your project for the users page */
|
||||
const users = [
|
||||
{
|
||||
caption: "User1",
|
||||
image: "/test-site/img/docusaurus.svg",
|
||||
infoLink: "https://www.example.com",
|
||||
pinned: true
|
||||
}
|
||||
caption: 'User1',
|
||||
image: '/test-site/img/docusaurus.svg',
|
||||
infoLink: 'https://www.example.com',
|
||||
pinned: true,
|
||||
},
|
||||
];
|
||||
|
||||
const siteConfig = {
|
||||
title: "Test Site" /* title for your website */,
|
||||
tagline: "A website for testing",
|
||||
url: "https://deltice.github.io" /* your website url */,
|
||||
baseUrl: "/test-site/" /* base url for your project */,
|
||||
projectName: "test-site",
|
||||
title: 'Test Site' /* title for your website */,
|
||||
tagline: 'A website for testing',
|
||||
url: 'https://deltice.github.io' /* your website url */,
|
||||
baseUrl: '/test-site/' /* base url for your project */,
|
||||
projectName: 'test-site',
|
||||
headerLinks: [
|
||||
{ doc: "doc1", label: "Docs" },
|
||||
{ doc: "doc4", label: "API" },
|
||||
{ page: "help", label: "Help" },
|
||||
{ blog: true, label: "Blog" }
|
||||
{doc: 'doc1', label: 'Docs'},
|
||||
{doc: 'doc4', label: 'API'},
|
||||
{page: 'help', label: 'Help'},
|
||||
{blog: true, label: 'Blog'},
|
||||
],
|
||||
users,
|
||||
/* path to images for header/footer */
|
||||
headerIcon: "img/docusaurus.svg",
|
||||
footerIcon: "img/docusaurus.svg",
|
||||
favicon: "img/favicon.png",
|
||||
headerIcon: 'img/docusaurus.svg',
|
||||
footerIcon: 'img/docusaurus.svg',
|
||||
favicon: 'img/favicon.png',
|
||||
/* colors for website */
|
||||
colors: {
|
||||
primaryColor: "#2E8555",
|
||||
secondaryColor: "#205C3B"
|
||||
primaryColor: '#2E8555',
|
||||
secondaryColor: '#205C3B',
|
||||
},
|
||||
// This copyright info is used in /core/Footer.js and blog rss/atom feeds.
|
||||
copyright:
|
||||
"Copyright © " +
|
||||
'Copyright © ' +
|
||||
new Date().getFullYear() +
|
||||
" Your Name or Your Company Name",
|
||||
' Your Name or Your Company Name',
|
||||
highlight: {
|
||||
// Highlight.js theme to use for syntax highlighting in code blocks
|
||||
theme: "default"
|
||||
theme: 'default',
|
||||
},
|
||||
scripts: [
|
||||
"https://buttons.github.io/buttons.js"
|
||||
],
|
||||
scripts: ['https://buttons.github.io/buttons.js'],
|
||||
// You may provide arbitrary config keys to be used as needed by your template.
|
||||
repoUrl: "https://github.com/deltice/test-site",
|
||||
repoUrl: 'https://github.com/deltice/test-site',
|
||||
};
|
||||
|
||||
module.exports = siteConfig;
|
||||
|
|
|
@ -8,174 +8,174 @@
|
|||
const languages = [
|
||||
{
|
||||
enabled: true,
|
||||
name: "English",
|
||||
tag: "en"
|
||||
name: 'English',
|
||||
tag: 'en',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "日本語",
|
||||
tag: "ja"
|
||||
name: '日本語',
|
||||
tag: 'ja',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "العربية",
|
||||
tag: "ar"
|
||||
name: 'العربية',
|
||||
tag: 'ar',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Bosanski",
|
||||
tag: "bs-BA"
|
||||
name: 'Bosanski',
|
||||
tag: 'bs-BA',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Català",
|
||||
tag: "ca"
|
||||
name: 'Català',
|
||||
tag: 'ca',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Čeština",
|
||||
tag: "cs"
|
||||
name: 'Čeština',
|
||||
tag: 'cs',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Dansk",
|
||||
tag: "da"
|
||||
name: 'Dansk',
|
||||
tag: 'da',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Deutsch",
|
||||
tag: "de"
|
||||
name: 'Deutsch',
|
||||
tag: 'de',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Ελληνικά",
|
||||
tag: "el"
|
||||
name: 'Ελληνικά',
|
||||
tag: 'el',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Español",
|
||||
tag: "es-ES"
|
||||
name: 'Español',
|
||||
tag: 'es-ES',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "فارسی",
|
||||
tag: "fa-IR"
|
||||
name: 'فارسی',
|
||||
tag: 'fa-IR',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Suomi",
|
||||
tag: "fi"
|
||||
name: 'Suomi',
|
||||
tag: 'fi',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Français",
|
||||
tag: "fr"
|
||||
name: 'Français',
|
||||
tag: 'fr',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "עִברִית",
|
||||
tag: "he"
|
||||
name: 'עִברִית',
|
||||
tag: 'he',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Magyar",
|
||||
tag: "hu"
|
||||
name: 'Magyar',
|
||||
tag: 'hu',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Bahasa Indonesia",
|
||||
tag: "id-ID"
|
||||
name: 'Bahasa Indonesia',
|
||||
tag: 'id-ID',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Italiano",
|
||||
tag: "it"
|
||||
name: 'Italiano',
|
||||
tag: 'it',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Afrikaans",
|
||||
tag: "af"
|
||||
name: 'Afrikaans',
|
||||
tag: 'af',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "한국어",
|
||||
tag: "ko"
|
||||
name: '한국어',
|
||||
tag: 'ko',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "मराठी",
|
||||
tag: "mr-IN"
|
||||
name: 'मराठी',
|
||||
tag: 'mr-IN',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Nederlands",
|
||||
tag: "nl"
|
||||
name: 'Nederlands',
|
||||
tag: 'nl',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Norsk",
|
||||
tag: "no-NO"
|
||||
name: 'Norsk',
|
||||
tag: 'no-NO',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Polskie",
|
||||
tag: "pl"
|
||||
name: 'Polskie',
|
||||
tag: 'pl',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Português",
|
||||
tag: "pt-PT"
|
||||
name: 'Português',
|
||||
tag: 'pt-PT',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Português (Brasil)",
|
||||
tag: "pt-BR"
|
||||
name: 'Português (Brasil)',
|
||||
tag: 'pt-BR',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Română",
|
||||
tag: "ro"
|
||||
name: 'Română',
|
||||
tag: 'ro',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Русский",
|
||||
tag: "ru"
|
||||
name: 'Русский',
|
||||
tag: 'ru',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Slovenský",
|
||||
tag: "sk-SK"
|
||||
name: 'Slovenský',
|
||||
tag: 'sk-SK',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Српски језик (Ћирилица)",
|
||||
tag: "sr"
|
||||
name: 'Српски језик (Ћирилица)',
|
||||
tag: 'sr',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Svenska",
|
||||
tag: "sv-SE"
|
||||
name: 'Svenska',
|
||||
tag: 'sv-SE',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Türkçe",
|
||||
tag: "tr"
|
||||
name: 'Türkçe',
|
||||
tag: 'tr',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Українська",
|
||||
tag: "uk"
|
||||
name: 'Українська',
|
||||
tag: 'uk',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "Tiếng Việt",
|
||||
tag: "vi"
|
||||
name: 'Tiếng Việt',
|
||||
tag: 'vi',
|
||||
},
|
||||
{
|
||||
enabled: false,
|
||||
name: "中文",
|
||||
tag: "zh-Hans"
|
||||
name: '中文',
|
||||
tag: 'zh-Hans',
|
||||
},
|
||||
{ enabled: false, name: "繁體中文", tag: "zh-Hant" }
|
||||
{enabled: false, name: '繁體中文', tag: 'zh-Hant'},
|
||||
];
|
||||
module.exports = languages;
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const React = require("react");
|
||||
const React = require('react');
|
||||
|
||||
const CompLibrary = require("../../core/CompLibrary.js");
|
||||
const CompLibrary = require('../../core/CompLibrary.js');
|
||||
const Container = CompLibrary.Container;
|
||||
const GridBlock = CompLibrary.GridBlock;
|
||||
|
||||
const translate = require("../../server/translate.js").translate;
|
||||
const translate = require('../../server/translate.js').translate;
|
||||
|
||||
const siteConfig = require(process.cwd() + "/siteConfig.js");
|
||||
const siteConfig = require(process.cwd() + '/siteConfig.js');
|
||||
|
||||
class Help extends React.Component {
|
||||
render() {
|
||||
|
@ -21,10 +21,11 @@ class Help extends React.Component {
|
|||
{
|
||||
content: (
|
||||
<translate>
|
||||
Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)
|
||||
Learn more using the [documentation on this
|
||||
site.](/test-site/docs/en/doc1.html)
|
||||
</translate>
|
||||
),
|
||||
title: <translate>Browse Docs</translate>
|
||||
title: <translate>Browse Docs</translate>,
|
||||
},
|
||||
{
|
||||
content: (
|
||||
|
@ -32,12 +33,12 @@ class Help extends React.Component {
|
|||
Ask questions about the documentation and project
|
||||
</translate>
|
||||
),
|
||||
title: <translate>Join the community</translate>
|
||||
title: <translate>Join the community</translate>,
|
||||
},
|
||||
{
|
||||
content: <translate>Find out what's new with this project</translate>,
|
||||
title: <translate>Stay up to date</translate>
|
||||
}
|
||||
title: <translate>Stay up to date</translate>,
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
|
@ -63,7 +64,7 @@ class Help extends React.Component {
|
|||
}
|
||||
|
||||
Help.defaultProps = {
|
||||
language: "en"
|
||||
language: 'en',
|
||||
};
|
||||
|
||||
module.exports = Help;
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const React = require("react");
|
||||
const React = require('react');
|
||||
|
||||
const CompLibrary = require("../../core/CompLibrary");
|
||||
const CompLibrary = require('../../core/CompLibrary');
|
||||
const Container = CompLibrary.Container;
|
||||
const GridBlock = CompLibrary.GridBlock;
|
||||
|
||||
const CWD = process.cwd();
|
||||
|
||||
const siteConfig = require(CWD + "/siteConfig.js");
|
||||
const versions = require(CWD + "/versions.json");
|
||||
const siteConfig = require(CWD + '/siteConfig.js');
|
||||
const versions = require(CWD + '/versions.json');
|
||||
|
||||
class Versions extends React.Component {
|
||||
render() {
|
||||
|
@ -24,7 +24,7 @@ class Versions extends React.Component {
|
|||
<Container className="mainContainer versionsContainer">
|
||||
<div className="post">
|
||||
<header className="postHeader">
|
||||
<h2>{siteConfig.title + " Versions"}</h2>
|
||||
<h2>{siteConfig.title + ' Versions'}</h2>
|
||||
</header>
|
||||
<p>New versions of this project are released every so often.</p>
|
||||
<a name="latest" />
|
||||
|
@ -32,14 +32,12 @@ class Versions extends React.Component {
|
|||
<table className="versions">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
{latestVersion}
|
||||
</th>
|
||||
<th>{latestVersion}</th>
|
||||
<td>
|
||||
<a href={""}>Documentation</a>
|
||||
<a href={''}>Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href={""}>Release Notes</a>
|
||||
<a href={''}>Release Notes</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -55,10 +53,10 @@ class Versions extends React.Component {
|
|||
<tr>
|
||||
<th>master</th>
|
||||
<td>
|
||||
<a href={""}>Documentation</a>
|
||||
<a href={''}>Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href={""}>Release Notes</a>
|
||||
<a href={''}>Release Notes</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -70,23 +68,22 @@ class Versions extends React.Component {
|
|||
<tbody>
|
||||
{versions.map(
|
||||
version =>
|
||||
version !== latestVersion &&
|
||||
<tr>
|
||||
<th>
|
||||
{version}
|
||||
</th>
|
||||
<td>
|
||||
<a href={""}>Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href={""}>Release Notes</a>
|
||||
</td>
|
||||
</tr>
|
||||
version !== latestVersion && (
|
||||
<tr>
|
||||
<th>{version}</th>
|
||||
<td>
|
||||
<a href={''}>Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href={''}>Release Notes</a>
|
||||
</td>
|
||||
</tr>
|
||||
)
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
You can find past versions of this project{" "}
|
||||
You can find past versions of this project{' '}
|
||||
<a href="https://github.com/"> on GitHub </a>.
|
||||
</p>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue