From fc2a9a756a8f12965d814830f36126b8f0a963de Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Feb 2018 09:59:09 -0800 Subject: Mobile optimize translated landing page --- .../public/css/basscss_responsive_custom.css | 27 ++++++++++++++++++++++ packages/website/ts/pages/landing/landing.tsx | 23 ++++++++++-------- 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/packages/website/public/css/basscss_responsive_custom.css b/packages/website/public/css/basscss_responsive_custom.css index c2e802125..5f8bd9117 100644 --- a/packages/website/public/css/basscss_responsive_custom.css +++ b/packages/website/public/css/basscss_responsive_custom.css @@ -4,12 +4,21 @@ .sm-center { text-align: center; } + .sm-align-middle { + vertical-align: middle; + } + .sm-align-top { + vertical-align: top; + } .sm-left-align { text-align: left; } .sm-right-align { text-align: right; } + .sm-table-cell { + display: table-cell; + } .sm-mx-auto { margin-left: auto; margin-right: auto; @@ -23,12 +32,21 @@ .md-center { text-align: center; } + .md-align-middle { + vertical-align: middle; + } + .md-align-top { + vertical-align: top; + } .md-left-align { text-align: left; } .md-right-align { text-align: right; } + .md-table-cell { + display: table-cell; + } .md-mx-auto { margin-left: auto; margin-right: auto; @@ -42,12 +60,21 @@ .lg-center { text-align: center; } + .lg-align-middle { + vertical-align: middle; + } + .lg-align-top { + vertical-align: top; + } .lg-left-align { text-align: left; } .lg-right-align { text-align: right; } + .lg-table-cell { + display: table-cell; + } .lg-mx-auto { margin-left: auto; margin-right: auto; diff --git a/packages/website/ts/pages/landing/landing.tsx b/packages/website/ts/pages/landing/landing.tsx index a7f90f169..5a231b99d 100644 --- a/packages/website/ts/pages/landing/landing.tsx +++ b/packages/website/ts/pages/landing/landing.tsx @@ -218,6 +218,7 @@ export class Landing extends React.Component { } private _renderHero() { const isSmallScreen = this.state.screenWidth === ScreenWidths.Sm; + const isMediumScreen = this.state.screenWidth === ScreenWidths.Md; const buttonLabelStyle: React.CSSProperties = { textTransform: 'none', fontSize: isSmallScreen ? 12 : 14, @@ -239,10 +240,9 @@ export class Landing extends React.Component {
@@ -266,7 +266,7 @@ export class Landing extends React.Component { > {this.props.translate.get(Key.TopTagline)}
-
+
{ style={{ color: colors.darkestGrey, height: 364, lineHeight: '364px' }} >
{this.props.translate.get(Key.TokenizedSectionHeader, Deco.Cap)} @@ -418,7 +418,10 @@ export class Landing extends React.Component { lineHeight: '430px', }} > -
+
{ const isSmallScreen = this.state.screenWidth === ScreenWidths.Sm; const boxStyle: React.CSSProperties = { maxWidth: 253, - height: 392, + height: 402, backgroundColor: colors.grey50, borderRadius: 5, padding: '10px 24px 24px', @@ -733,7 +736,8 @@ export class Landing extends React.Component { lineHeight: '33px', height: 49, }; - const callToActionClassNames = 'lg-pr3 md-pr3 lg-right-align md-right-align sm-center sm-px3 h4'; + const callToActionClassNames = + 'lg-pr3 md-pr3 lg-right-align md-right-align sm-center sm-px3 h4 lg-table-cell md-table-cell'; return (
@@ -744,12 +748,11 @@ export class Landing extends React.Component { fontFamily: 'Roboto Mono', color: colors.white, lineHeight: isSmallScreen ? 1.7 : 3, - display: 'table-cell', }} > {this.props.translate.get(Key.FinalCallToAction, Deco.Cap)}
-
+