From df9d3e3e16e5a00ea84369691c46a6e4a6a53049 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 18 Dec 2017 09:15:12 +0100 Subject: Consolidate all custom colors and material-ui colors into a colors module --- packages/website/ts/pages/landing/landing.tsx | 54 +++++++++++++-------------- 1 file changed, 25 insertions(+), 29 deletions(-) (limited to 'packages/website/ts/pages/landing') diff --git a/packages/website/ts/pages/landing/landing.tsx b/packages/website/ts/pages/landing/landing.tsx index cf373bbf8..56d021b8d 100644 --- a/packages/website/ts/pages/landing/landing.tsx +++ b/packages/website/ts/pages/landing/landing.tsx @@ -1,12 +1,13 @@ import * as _ from 'lodash'; import RaisedButton from 'material-ui/RaisedButton'; -import {colors} from 'material-ui/styles'; +import {colors} from 'ts/utils/colors'; import * as React from 'react'; import DocumentTitle = require('react-document-title'); import {Link} from 'react-router-dom'; import {Footer} from 'ts/components/footer'; import {TopBar} from 'ts/components/top_bar'; import {ScreenWidths, WebsitePaths} from 'ts/types'; +import {configs} from 'ts/utils/configs'; import {constants} from 'ts/utils/constants'; import {utils} from 'ts/utils/utils'; @@ -35,11 +36,6 @@ interface Project { } const THROTTLE_TIMEOUT = 100; -const CUSTOM_HERO_BACKGROUND_COLOR = '#404040'; -const CUSTOM_PROJECTS_BACKGROUND_COLOR = '#343333'; -const CUSTOM_WHITE_BACKGROUND = 'rgb(245, 245, 245)'; -const CUSTOM_WHITE_TEXT = '#E4E4E4'; -const CUSTOM_GRAY_TEXT = '#919191'; const boxContents: BoxContent[] = [ { @@ -166,7 +162,7 @@ export class Landing extends React.Component { blockchainIsLoaded={false} location={this.props.location} isNightVersion={true} - style={{backgroundColor: CUSTOM_HERO_BACKGROUND_COLOR, position: 'relative'}} + style={{backgroundColor: colors.heroGray, position: 'relative'}} /> {this.renderHero()} {this.renderProjects()} @@ -197,7 +193,7 @@ export class Landing extends React.Component { return (
{ style={{borderRadius: 6, minWidth: 150}} buttonStyle={lightButtonStyle} labelColor="white" - backgroundColor={CUSTOM_HERO_BACKGROUND_COLOR} + backgroundColor={colors.heroGray} labelStyle={buttonLabelStyle} label="Join the community" onClick={_.noop} @@ -291,7 +287,7 @@ export class Landing extends React.Component { }); const titleStyle: React.CSSProperties = { fontFamily: 'Roboto Mono', - color: '#A4A4A4', + color: colors.gray, textTransform: 'uppercase', fontWeight: 300, letterSpacing: 3, @@ -299,7 +295,7 @@ export class Landing extends React.Component { return (
{
view the{' '} full list @@ -333,7 +329,7 @@ export class Landing extends React.Component { return (
{isSmallScreen && @@ -386,7 +382,7 @@ export class Landing extends React.Component { return (
@@ -397,7 +393,7 @@ export class Landing extends React.Component {
{
{ view all @@ -485,7 +481,7 @@ export class Landing extends React.Component { return (
{isSmallScreen && @@ -493,7 +489,7 @@ export class Landing extends React.Component { }
{ 0x.js @@ -525,7 +521,7 @@ export class Landing extends React.Component { smart contract @@ -605,7 +601,7 @@ export class Landing extends React.Component { const boxStyle: React.CSSProperties = { maxWidth: 252, height: 386, - backgroundColor: '#F9F9F9', + backgroundColor: colors.lightestGray, borderRadius: 5, padding: '10px 24px 24px', }; @@ -642,7 +638,7 @@ export class Landing extends React.Component { return (
{ const cases = _.map(useCases, (useCase: UseCase) => { const style = _.isUndefined(useCase.style) || isSmallScreen ? {} : useCase.style; const useCaseBoxStyle = { - color: '#A2A2A2', + color: colors.gray, border: '1px solid #565656', borderRadius: 4, maxWidth: isSmallScreen ? 375 : 'none', ...style, }; const typeStyle: React.CSSProperties = { - color: '#EBEBEB', + color: colors.lightestGray, fontSize: 13, textTransform: 'uppercase', fontFamily: 'Roboto Mono', @@ -753,7 +749,7 @@ export class Landing extends React.Component { return (
{ return (
{ style={{borderRadius: 6, minWidth: 150}} buttonStyle={lightButtonStyle} labelColor={colors.white} - backgroundColor={CUSTOM_HERO_BACKGROUND_COLOR} + backgroundColor={colors.heroGray} labelStyle={buttonLabelStyle} label="Build on 0x" onClick={_.noop} -- cgit v1.2.3