Layout changes

This commit is contained in:
Jori Lallo
2016-09-12 22:19:59 -07:00
parent e7ff801b97
commit 4493325429
2 changed files with 56 additions and 49 deletions

View File

@ -36,13 +36,13 @@ class Layout extends React.Component {
@keydown(['/', 't']) @keydown(['/', 't'])
search() { search() {
// if (!this.props.search) return; if (!this.props.user) return;
_.defer(() => browserHistory.push('/search')); _.defer(() => browserHistory.push('/search'));
} }
@keydown(['d']) @keydown(['d'])
dashboard() { dashboard() {
// if (!this.props.search) return; if (!this.props.user) return;
_.defer(() => browserHistory.push('/')); _.defer(() => browserHistory.push('/'));
} }
@ -75,11 +75,12 @@ class Layout extends React.Component {
</span> </span>
</div> </div>
<Flex className={ styles.headerRight }> <Flex className={ styles.headerRight }>
{ user.user && (
<Flex> <Flex>
<Flex align="center" className={ styles.actions }> <Flex align="center" className={ styles.actions }>
{ this.props.actions } { this.props.actions }
</Flex> </Flex>
{ user.user && (
<Flex>
{ this.props.search && ( { this.props.search && (
<Flex> <Flex>
<div <div
@ -104,6 +105,7 @@ class Layout extends React.Component {
</Flex> </Flex>
) } ) }
</Flex> </Flex>
</Flex>
</div> </div>
<div <div

View File

@ -2,6 +2,9 @@ import React from 'react';
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import { browserHistory } from 'react-router' 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 SlackAuthLink from 'components/SlackAuthLink';
import styles from './Home.scss'; import styles from './Home.scss';
@ -20,8 +23,9 @@ export default class Home extends React.Component {
render() { render() {
return ( return (
<div className={ styles.container }> <Flex auto>
<div className={ styles.content }> <Layout>
<CenteredContent>
<div className={ styles.intro }> <div className={ styles.intro }>
<h1>Atlas</h1> <h1>Atlas</h1>
<p>Simple, fast, markdown.</p> <p>Simple, fast, markdown.</p>
@ -38,8 +42,9 @@ export default class Home extends React.Component {
/> />
</SlackAuthLink> </SlackAuthLink>
</div> </div>
</div> </CenteredContent>
</div> </Layout>
</Flex>
); );
} }
} }