From a1cb7af47f06ec742056ef3fc1825c9abb89e2a3 Mon Sep 17 00:00:00 2001 From: Yangshun Tay Date: Fri, 13 Oct 2017 02:14:32 +0800 Subject: [PATCH] Use glamor styles for home page --- src/pages/index.js | 176 +++++++++++++++++++-------------------------- 1 file changed, 73 insertions(+), 103 deletions(-) diff --git a/src/pages/index.js b/src/pages/index.js index 7475a24f..bd15fadf 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -146,36 +146,85 @@ class Home extends Component {
-
-
-
-

Declarative

-

React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.

-

Declarative views make your code more predictable and easier to debug.

-
-
-

Component-Based

-

Build encapsulated components that manage their own state, then compose them to make complex UIs.

-

Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM.

-
-
-

Learn Once, Write Anywhere

-

We don't make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code.

-

React can also render on the server using Node and power mobile apps using React Native.

-
-
-
-
-
+
+
{marketingColumns.map((column, index) => -
-

{column.title}

+
+

{column.title}

)}
-
+
@@ -333,85 +382,6 @@ const markdownStyles = { }, }, - '& .home-section:first-child': { - [media.lessThan('medium')]: { - marginTop: 0, - marginBottom: 0, - overflowX: 'auto', - paddingTop: 30, - WebkitOverflowScrolling: 'touch', - position: 'relative', - maskImage: - 'linear-gradient(to right, transparent, white 10px, white 90%, transparent)', - }, - }, - - '& .homeDivider': { - height: 1, - marginBottom: -1, - border: 'none', - borderBottom: `1 solid ${colors.divider}`, - }, - - '& .marketing-row': { - display: 'flex', - flexDirection: 'row', - - [media.lessThan('medium')]: { - display: 'block', - whiteSpace: 'nowrap', - }, - }, - - '& .marketing-col': { - display: 'flex', - flexDirection: 'column', - flex: '0 1 33%', - marginLeft: 40, - - '&:first-of-type': { - marginLeft: 0, - - [media.lessThan('medium')]: { - marginLeft: 10, - }, - }, - - [media.lessThan('medium')]: { - display: 'inline-block', - verticalAlign: 'top', - marginLeft: 0, - whiteSpace: 'normal', - width: '75%', - marginRight: 20, - paddingBottom: 40, - - '&:first-of-type': { - marginTop: 0, - }, - }, - - '& h3': { - color: colors.subtle, - paddingTop: 0, - fontWeight: 300, - fontSize: 20, - - [media.greaterThan('xlarge')]: { - fontSize: 24, - fontWeight: 200, - }, - }, - - '& p': { - lineHeight: 1.7, - }, - - '& h3 + p': { - marginTop: 20, - }, - }, - '& .example': { marginTop: 40,