From 4493325429545c1c49ea4fd2b0d36a5c620fe829 Mon Sep 17 00:00:00 2001 From: Jori Lallo Date: Mon, 12 Sep 2016 22:19:59 -0700 Subject: [PATCH] Layout changes --- frontend/components/Layout/Layout.js | 60 ++++++++++++++-------------- frontend/scenes/Home/Home.js | 45 +++++++++++---------- 2 files changed, 56 insertions(+), 49 deletions(-) diff --git a/frontend/components/Layout/Layout.js b/frontend/components/Layout/Layout.js index 6bec7cc94..891f2cb74 100644 --- a/frontend/components/Layout/Layout.js +++ b/frontend/components/Layout/Layout.js @@ -36,13 +36,13 @@ class Layout extends React.Component { @keydown(['/', 't']) search() { - // if (!this.props.search) return; + if (!this.props.user) return; _.defer(() => browserHistory.push('/search')); } @keydown(['d']) dashboard() { - // if (!this.props.search) return; + if (!this.props.user) return; _.defer(() => browserHistory.push('/')); } @@ -75,34 +75,36 @@ class Layout extends React.Component { - { user.user && ( - - - { this.props.actions } - - { this.props.search && ( - -
- Search -
-
- ) } - } - > - Settings - Logout - + + + { this.props.actions } - ) } + { user.user && ( + + { this.props.search && ( + +
+ Search +
+
+ ) } + } + > + Settings + Logout + +
+ ) } +
diff --git a/frontend/scenes/Home/Home.js b/frontend/scenes/Home/Home.js index a39f60226..9bc841fc3 100644 --- a/frontend/scenes/Home/Home.js +++ b/frontend/scenes/Home/Home.js @@ -2,6 +2,9 @@ import React from 'react'; import { observer } from 'mobx-react'; import { browserHistory } from 'react-router' +import { Flex } from 'reflexbox'; +import Layout from 'components/Layout'; +import CenteredContent from 'components/CenteredContent'; import SlackAuthLink from 'components/SlackAuthLink'; import styles from './Home.scss'; @@ -20,26 +23,28 @@ export default class Home extends React.Component { render() { return ( -
-
-
-

Atlas

-

Simple, fast, markdown.

-

We're building a modern wiki for engineering teams.

-
-
- - Sign in with Slack - -
-
-
+ + + +
+

Atlas

+

Simple, fast, markdown.

+

We're building a modern wiki for engineering teams.

+
+
+ + Sign in with Slack + +
+
+
+
); } }