From 0652790703e9b4d8e96db26c34e389e5602eb410 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 8 Feb 2018 16:27:37 -0800 Subject: Add Relayer section to landing --- packages/website/ts/pages/landing/landing.tsx | 146 ++++++++++++++------------ 1 file changed, 80 insertions(+), 66 deletions(-) (limited to 'packages/website/ts/pages') diff --git a/packages/website/ts/pages/landing/landing.tsx b/packages/website/ts/pages/landing/landing.tsx index b0c622fb4..fc943dce8 100644 --- a/packages/website/ts/pages/landing/landing.tsx +++ b/packages/website/ts/pages/landing/landing.tsx @@ -65,17 +65,17 @@ const boxContents: BoxContent[] = [ }, ]; -const projects: Project[] = [ +const relayersAndDappProjects: Project[] = [ { - logoFileName: 'ethfinex-top.png', + logoFileName: 'ethfinex.png', projectUrl: constants.PROJECT_URL_ETHFINEX, }, { - logoFileName: 'radar_relay_top.png', + logoFileName: 'radar_relay.png', projectUrl: constants.PROJECT_URL_RADAR_RELAY, }, { - logoFileName: 'paradex_top.png', + logoFileName: 'paradex.png', projectUrl: constants.PROJECT_URL_PARADEX, }, { @@ -132,6 +132,57 @@ const projects: Project[] = [ }, ]; +const relayerProjects: Project[] = [ + { + logoFileName: 'ethfinex.png', + projectUrl: constants.PROJECT_URL_ETHFINEX, + }, + { + logoFileName: 'radar_relay.png', + projectUrl: constants.PROJECT_URL_RADAR_RELAY, + }, + { + logoFileName: 'paradex.png', + projectUrl: constants.PROJECT_URL_PARADEX, + }, + { + logoFileName: 'the_ocean.png', + projectUrl: constants.PROJECT_URL_0CEAN, + }, + { + logoFileName: 'dydx.png', + projectUrl: constants.PROJECT_URL_DYDX, + }, + { + logoFileName: 'amadeus.png', + projectUrl: constants.PROJECT_URL_DYDX, + }, + { + logoFileName: 'ddex.png', + projectUrl: constants.PROJECT_URL_DYDX, + }, + { + logoFileName: 'decent_ex.png', + projectUrl: constants.PROJECT_URL_DYDX, + }, + { + logoFileName: 'dextroid.png', + projectUrl: constants.PROJECT_URL_DYDX, + }, + { + logoFileName: 'ercdex.png', + projectUrl: constants.PROJECT_URL_DYDX, + }, + { + logoFileName: 'open_relay.png', + projectUrl: constants.PROJECT_URL_DYDX, + }, + { + logoFileName: 'idt.png', + projectUrl: constants.PROJECT_URL_IDT, + }, +]; + export interface LandingProps { location: Location; } @@ -167,9 +218,10 @@ export class Landing extends React.Component { style={{ backgroundColor: colors.heroGrey, position: 'relative' }} /> {this._renderHero()} - {this._renderProjects()} + {this._renderProjects(relayersAndDappProjects, 'Projects building on 0x', colors.projectsGrey)} {this._renderTokenizationSection()} {this._renderProtocolSection()} + {this._renderProjects(relayerProjects, 'Relayers building on 0x', colors.heroGrey)} {this._renderInfoBoxes()} {this._renderBuildingBlocksSection()} {this._renderUseCases()} @@ -259,11 +311,25 @@ export class Landing extends React.Component { ); } - private _renderProjects() { + private _renderProjects(projects: Project[], title: string, backgroundColor: string) { const isSmallScreen = this.state.screenWidth === ScreenWidths.Sm; const isMediumScreen = this.state.screenWidth === ScreenWidths.Md; const projectList = _.map(projects, (project: Project, i: number) => { - const colWidth = isSmallScreen ? 3 : isMediumScreen ? 4 : 2 - i % 2; + const isRelayersOnly = projects.length === 12; + let colWidth: number; + switch (this.state.screenWidth) { + case ScreenWidths.Sm: + colWidth = isRelayersOnly ? 4 : 4; + break; + + case ScreenWidths.Md: + colWidth = isRelayersOnly ? 3 : 3; + break; + + case ScreenWidths.Lg: + colWidth = isRelayersOnly ? 2 : 2 - i % 2; + break; + } return (
@@ -285,10 +351,10 @@ export class Landing extends React.Component { letterSpacing: 3, }; return ( -
+
- Projects building on 0x + {title}
{projectList}
{
{isSmallScreen && this._renderTokenCloud()} -
+
The world's value is becoming tokenized @@ -358,16 +424,15 @@ export class Landing extends React.Component { private _renderProtocolSection() { const isSmallScreen = this.state.screenWidth === ScreenWidths.Sm; return ( -
-
+
+
@@ -388,57 +453,6 @@ export class Landing extends React.Component { eliminating blockchain bloat. Relayers help broadcast orders and collect a fee each time they facilitate a trade. Anyone can build a relayer.
-
-
-
- RELAYERS BUILDING ON 0X -
-
- - view all - -
-
-
-
- -
-
- -
-
- -
-
-
@@ -551,7 +565,7 @@ export class Landing extends React.Component { fontFamily: 'Roboto Mono', fontSize: 13.5, fontWeight: 400, - opacity: 0.75, + color: colors.darkestGrey, }} > {assetType.title} -- cgit