From 61bfbb86e121f995c2ebf8bf01e758496d3071cc Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 28 Aug 2018 17:18:40 +0100 Subject: Implement dev topbar --- .../website/public/images/developers/chat_icon.svg | 5 ++ .../public/images/developers/forum_icon.svg | 5 ++ .../public/images/developers/github_icon.svg | 4 + .../documentation/docs_content_top_bar.tsx | 98 ++++++++++++++++------ .../ts/components/documentation/docs_logo.tsx | 2 +- 5 files changed, 87 insertions(+), 27 deletions(-) create mode 100644 packages/website/public/images/developers/chat_icon.svg create mode 100644 packages/website/public/images/developers/forum_icon.svg create mode 100644 packages/website/public/images/developers/github_icon.svg (limited to 'packages') diff --git a/packages/website/public/images/developers/chat_icon.svg b/packages/website/public/images/developers/chat_icon.svg new file mode 100644 index 000000000..c48881454 --- /dev/null +++ b/packages/website/public/images/developers/chat_icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/website/public/images/developers/forum_icon.svg b/packages/website/public/images/developers/forum_icon.svg new file mode 100644 index 000000000..8fb659475 --- /dev/null +++ b/packages/website/public/images/developers/forum_icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/website/public/images/developers/github_icon.svg b/packages/website/public/images/developers/github_icon.svg new file mode 100644 index 000000000..bf10cb221 --- /dev/null +++ b/packages/website/public/images/developers/github_icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/website/ts/components/documentation/docs_content_top_bar.tsx b/packages/website/ts/components/documentation/docs_content_top_bar.tsx index c9bdca61b..c2bbfc417 100644 --- a/packages/website/ts/components/documentation/docs_content_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_content_top_bar.tsx @@ -3,9 +3,8 @@ import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; import * as React from 'react'; import { Link } from 'react-router-dom'; -import { TopBarMenuItem } from 'ts/components/top_bar/top_bar_menu_item'; import { Container } from 'ts/components/ui/container'; -import { Deco, Key, WebsitePaths } from 'ts/types'; +import { Deco, Key, ObjectMap, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; @@ -29,6 +28,13 @@ const styles: Styles = { }, }; +interface MenuItemInfo { + title: string; + url: string; + iconUrl: string; + textStyle: React.CSSProperties; +} + export class DocsContentTopBar extends React.Component { constructor(props: DocsContentTopBarProps) { super(props); @@ -49,35 +55,44 @@ export class DocsContentTopBar extends React.Component - +
+
- 0xproject.com + + +
+ 0xproject.com +
+
- - - + {this._renderMenuItems(menuItemInfos)}
@@ -86,10 +101,41 @@ export class DocsContentTopBar extends React.Component
+
{this._renderDrawer()}
); } + private _renderMenuItems(menuItemInfos: MenuItemInfo[]): React.ReactNode { + const menuItems = _.map(menuItemInfos, menuItemInfo => { + return ( + +
+ +
+ {menuItemInfo.title} +
+
+
+ ); + }); + return menuItems; + } private _renderDrawer(): React.ReactNode { return ( { return (
- +
); -- cgit