diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-18 23:10:02 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-03-18 23:10:02 +0800 |
commit | c1d17c83f8ee246c60b277c9c76b4eb9db1dba05 (patch) | |
tree | 33f290b69674dd9b375d93450dcd952a1f546541 /packages/website/ts/components | |
parent | db030016fa2e38d4135eb2d9ff16bc65aaa1fdd9 (diff) | |
download | dexon-sol-tools-c1d17c83f8ee246c60b277c9c76b4eb9db1dba05.tar.gz dexon-sol-tools-c1d17c83f8ee246c60b277c9c76b4eb9db1dba05.tar.zst dexon-sol-tools-c1d17c83f8ee246c60b277c9c76b4eb9db1dba05.zip |
Add sol-cov docs to website
Diffstat (limited to 'packages/website/ts/components')
-rw-r--r-- | packages/website/ts/components/sidebar_header.tsx | 1 | ||||
-rw-r--r-- | packages/website/ts/components/top_bar/top_bar.tsx | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/packages/website/ts/components/sidebar_header.tsx b/packages/website/ts/components/sidebar_header.tsx index 6216d2146..6fae03691 100644 --- a/packages/website/ts/components/sidebar_header.tsx +++ b/packages/website/ts/components/sidebar_header.tsx @@ -8,6 +8,7 @@ const titleToIcon: { [title: string]: string } = { '0x.js': 'zeroExJs.png', Web3Wrapper: 'zeroExJs.png', Deployer: 'zeroExJs.png', + 'Sol-cov': 'zeroExJs.png', 'JSON Schemas': 'zeroExJs.png', '0x Connect': 'connect.png', '0x Smart Contracts': 'contracts.png', diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index 9474311b4..fd33e8605 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -157,6 +157,12 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { primaryText={this.props.translate.get(Key.JsonSchemas, 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>, ]; const bottomBorderStyle = this._shouldDisplayBottomBar() ? styles.bottomBar : {}; const fullWidthClasses = isFullWidthPage ? 'pr4' : ''; @@ -319,6 +325,14 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { </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._isViewingPortal() && ( <Link to={`${WebsitePaths.Portal}`} className="text-decoration-none"> <MenuItem className="py2"> @@ -351,6 +365,7 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { !this._isViewingWeb3WrapperDocs() && !this._isViewingDeployerDocs() && !this._isViewingJsonSchemasDocs() && + !this._isViewingSolCovDocs() && !this._isViewingConnectDocs()) || _.isUndefined(this.props.menu) ) { @@ -448,6 +463,9 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { private _isViewingJsonSchemasDocs() { return _.includes(this.props.location.pathname, WebsitePaths.JSONSchemas); } + private _isViewingSolCovDocs() { + return _.includes(this.props.location.pathname, WebsitePaths.SolCov); + } private _isViewingWiki() { return _.includes(this.props.location.pathname, WebsitePaths.Wiki); } @@ -460,6 +478,7 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { this._isViewingWeb3WrapperDocs() || this._isViewingDeployerDocs() || this._isViewingJsonSchemasDocs() || + this._isViewingSolCovDocs() || this._isViewingConnectDocs() ); } |