aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/top_bar/top_bar.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/components/top_bar/top_bar.tsx')
-rw-r--r--packages/website/ts/components/top_bar/top_bar.tsx117
1 files changed, 107 insertions, 10 deletions
diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx
index 29c68524c..3a6ceed34 100644
--- a/packages/website/ts/components/top_bar/top_bar.tsx
+++ b/packages/website/ts/components/top_bar/top_bar.tsx
@@ -120,14 +120,36 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
primaryText={this.props.translate.get(Key.StandardRelayerApi, Deco.CapWords)}
/>
</a>,
- <a
- key="subMenuItem-github"
- target="_blank"
- className="text-decoration-none"
- href={constants.URL_GITHUB_ORG}
- >
- <MenuItem style={{ fontSize: styles.menuItem.fontSize }} primaryText="GitHub" />
- </a>,
+ <Link key="subMenuItem-jsonSchema" to={WebsitePaths.JSONSchemas} className="text-decoration-none">
+ <MenuItem
+ style={{ fontSize: styles.menuItem.fontSize }}
+ primaryText={this.props.translate.get(Key.JsonSchemas, Deco.CapWords)}
+ />
+ </Link>,
+ <Link key="subMenuItem-subproviders" to={WebsitePaths.Subproviders} className="text-decoration-none">
+ <MenuItem
+ style={{ fontSize: styles.menuItem.fontSize }}
+ primaryText={this.props.translate.get(Key.Subproviders, Deco.CapWords)}
+ />
+ </Link>,
+ <Link key="subMenuItem-web3Wrapper" to={WebsitePaths.Web3Wrapper} className="text-decoration-none">
+ <MenuItem
+ style={{ fontSize: styles.menuItem.fontSize }}
+ primaryText={this.props.translate.get(Key.Web3Wrapper, Deco.CapWords)}
+ />
+ </Link>,
+ <Link key="subMenuItem-deployer" to={WebsitePaths.Deployer} className="text-decoration-none">
+ <MenuItem
+ style={{ fontSize: styles.menuItem.fontSize }}
+ primaryText={this.props.translate.get(Key.Deployer, Deco.CapWords)}
+ />
+ </Link>,
+ <Link key="subMenuItem-sol-cov" to={WebsitePaths.SolCov} className="text-decoration-none">
+ <MenuItem
+ style={{ fontSize: styles.menuItem.fontSize }}
+ primaryText={this.props.translate.get(Key.SolCov, Deco.CapWords)}
+ />
+ </Link>,
<a
key="subMenuItem-whitePaper"
target="_blank"
@@ -139,6 +161,14 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
primaryText={this.props.translate.get(Key.Whitepaper, Deco.CapWords)}
/>
</a>,
+ <a
+ key="subMenuItem-github"
+ target="_blank"
+ className="text-decoration-none"
+ href={constants.URL_GITHUB_ORG}
+ >
+ <MenuItem style={{ fontSize: styles.menuItem.fontSize }} primaryText="GitHub" />
+ </a>,
];
const bottomBorderStyle = this._shouldDisplayBottomBar() ? styles.bottomBar : {};
const fullWidthClasses = isFullWidthPage ? 'pr4' : '';
@@ -277,6 +307,46 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
</MenuItem>
</Link>
)}
+ {!this._isViewingWeb3WrapperDocs() && (
+ <Link to={WebsitePaths.Web3Wrapper} className="text-decoration-none">
+ <MenuItem className="py2">
+ {this.props.translate.get(Key.Web3Wrapper, Deco.Cap)}{' '}
+ {this.props.translate.get(Key.Docs, Deco.Cap)}
+ </MenuItem>
+ </Link>
+ )}
+ {!this._isViewingDeployerDocs() && (
+ <Link to={WebsitePaths.Deployer} className="text-decoration-none">
+ <MenuItem className="py2">
+ {this.props.translate.get(Key.Deployer, Deco.Cap)}{' '}
+ {this.props.translate.get(Key.Docs, Deco.Cap)}
+ </MenuItem>
+ </Link>
+ )}
+ {!this._isViewingJsonSchemasDocs() && (
+ <Link to={WebsitePaths.JSONSchemas} className="text-decoration-none">
+ <MenuItem className="py2">
+ {this.props.translate.get(Key.JsonSchemas, Deco.Cap)}{' '}
+ {this.props.translate.get(Key.Docs, Deco.Cap)}
+ </MenuItem>
+ </Link>
+ )}
+ {!this._isViewingSolCovDocs() && (
+ <Link to={WebsitePaths.SolCov} className="text-decoration-none">
+ <MenuItem className="py2">
+ {this.props.translate.get(Key.SolCov, Deco.Cap)}{' '}
+ {this.props.translate.get(Key.Docs, Deco.Cap)}
+ </MenuItem>
+ </Link>
+ )}
+ {!this._isViewingSubprovidersDocs() && (
+ <Link to={WebsitePaths.Subproviders} className="text-decoration-none">
+ <MenuItem className="py2">
+ {this.props.translate.get(Key.Subproviders, Deco.Cap)}{' '}
+ {this.props.translate.get(Key.Docs, Deco.Cap)}
+ </MenuItem>
+ </Link>
+ )}
{!this._isViewingPortal() && (
<Link to={`${WebsitePaths.Portal}`} className="text-decoration-none">
<MenuItem className="py2">
@@ -304,7 +374,14 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
}
private _renderDocsMenu(): React.ReactNode {
if (
- (!this._isViewing0xjsDocs() && !this._isViewingSmartContractsDocs() && !this._isViewingConnectDocs()) ||
+ (!this._isViewing0xjsDocs() &&
+ !this._isViewingSmartContractsDocs() &&
+ !this._isViewingWeb3WrapperDocs() &&
+ !this._isViewingDeployerDocs() &&
+ !this._isViewingJsonSchemasDocs() &&
+ !this._isViewingSolCovDocs() &&
+ !this._isViewingSubprovidersDocs() &&
+ !this._isViewingConnectDocs()) ||
_.isUndefined(this.props.menu)
) {
return undefined;
@@ -392,6 +469,21 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
private _isViewingSmartContractsDocs() {
return _.includes(this.props.location.pathname, WebsitePaths.SmartContracts);
}
+ private _isViewingWeb3WrapperDocs() {
+ return _.includes(this.props.location.pathname, WebsitePaths.Web3Wrapper);
+ }
+ private _isViewingDeployerDocs() {
+ return _.includes(this.props.location.pathname, WebsitePaths.Deployer);
+ }
+ private _isViewingJsonSchemasDocs() {
+ return _.includes(this.props.location.pathname, WebsitePaths.JSONSchemas);
+ }
+ private _isViewingSolCovDocs() {
+ return _.includes(this.props.location.pathname, WebsitePaths.SolCov);
+ }
+ private _isViewingSubprovidersDocs() {
+ return _.includes(this.props.location.pathname, WebsitePaths.Subproviders);
+ }
private _isViewingWiki() {
return _.includes(this.props.location.pathname, WebsitePaths.Wiki);
}
@@ -401,7 +493,12 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
this._isViewing0xjsDocs() ||
this._isViewingFAQ() ||
this._isViewingSmartContractsDocs() ||
+ this._isViewingWeb3WrapperDocs() ||
+ this._isViewingDeployerDocs() ||
+ this._isViewingJsonSchemasDocs() ||
+ this._isViewingSolCovDocs() ||
+ this._isViewingSubprovidersDocs() ||
this._isViewingConnectDocs()
);
}
-}
+} // tslint:disable:max-file-line-count