Layout refinments

This commit is contained in:
Cássio Zen 2016-07-14 17:17:18 -03:00
parent 2746d91e39
commit 5d6eec28bb
7 changed files with 98 additions and 18 deletions

View File

@ -0,0 +1,13 @@
.root {
cursor: pointer;
}
.root h1 {
font-weight: 500;
font-size: 18px;
}
.root h2 {
font-weight: 400;
font-size: 16px;
}

View File

@ -1,5 +1,6 @@
import React, { PropTypes } from 'react'; import React, { PropTypes } from 'react';
import { Card } from '../UI'; import { Card } from '../UI';
import styles from './ImageCard.css'
export default class ImageCard extends React.Component { export default class ImageCard extends React.Component {
constructor(props) { constructor(props) {
@ -34,16 +35,16 @@ export default class ImageCard extends React.Component {
render() { render() {
const { onClick, image, text } = this.props; const { onClick, image, text } = this.props;
return ( return (
<Card onClick={onClick}> <Card onClick={onClick} className={styles.root}>
<img src={image} /> {image ? <img src={image} /> : null}
<h4>{text}</h4> <h1>{text}</h1>
</Card> </Card>
); );
} }
} }
ImageCard.propTypes = { ImageCard.propTypes = {
image: PropTypes.string.isRequired, image: PropTypes.string,
onClick: PropTypes.func, onClick: PropTypes.func,
onImageLoaded: PropTypes.func, onImageLoaded: PropTypes.func,
text: PropTypes.string.isRequired text: PropTypes.string.isRequired

View File

@ -12,12 +12,13 @@ export default class EntryListing extends React.Component {
this.bricksConfig = { this.bricksConfig = {
packed: 'data-packed', packed: 'data-packed',
sizes: [ sizes: [
{ columns: 2, gutter: 15 }, { columns: 1, gutter: 15 },
{ mq: '780px', columns: 3, gutter: 15 }, { mq: '495px', columns: 2, gutter: 15 },
{ mq: '1035px', columns: 4, gutter: 15 }, { mq: '750px', columns: 3, gutter: 15 },
{ mq: '1290px', columns: 5, gutter: 15 }, { mq: '1005px', columns: 4, gutter: 15 },
{ mq: '1545px', columns: 6, gutter: 15 }, { mq: '1260px', columns: 5, gutter: 15 },
{ mq: '1800px', columns: 7, gutter: 15 }, { mq: '1515px', columns: 6, gutter: 15 },
{ mq: '1770px', columns: 7, gutter: 15 },
] ]
}; };
} }

43
src/containers/App.css Normal file
View File

@ -0,0 +1,43 @@
.alignable {
margin: 0px auto;
}
@media (max-width: 749px) and (min-width: 495px) {
.alignable {
width: 495px;
}
}
@media (max-width: 1004px) and (min-width: 750px) {
.alignable {
width: 750px;
}
}
@media (max-width: 1259px) and (min-width: 1005px) {
.alignable {
width: 1005px;
}
}
@media (max-width: 1514px) and (min-width: 1260px) {
.alignable {
width: 1260px;
}
}
@media (max-width: 1769px) and (min-width: 1515px) {
.alignable {
width: 1515px;
}
}
@media (min-width: 1770px) {
.alignable {
width: 1770px;
}
}
.main {
padding-top: 60px;
}

View File

@ -5,6 +5,7 @@ import { loginUser } from '../actions/auth';
import { currentBackend } from '../backends/backend'; import { currentBackend } from '../backends/backend';
import { LIST_POSTS, LIST_FAQ, HELP, MORE_COMMANDS } from '../actions/findbar'; import { LIST_POSTS, LIST_FAQ, HELP, MORE_COMMANDS } from '../actions/findbar';
import FindBar from './FindBar'; import FindBar from './FindBar';
import styles from './App.css';
class App extends React.Component { class App extends React.Component {
componentDidMount() { componentDidMount() {
@ -70,12 +71,18 @@ class App extends React.Component {
return ( return (
<div> <div>
<FindBar commands={[ <header>
{ id: LIST_POSTS, pattern: 'List Posts' }, <div className={styles.alignable}>
{ id: LIST_FAQ, pattern: 'List FAQs' }, <FindBar commands={[
{ id: HELP, pattern: 'Help' }, { id: LIST_POSTS, pattern: 'List Posts' },
]} /> { id: LIST_FAQ, pattern: 'List FAQs' },
{children} { id: HELP, pattern: 'Help' },
]} />
</div>
</header>
<div className={`${styles.alignable} ${styles.main}`}>
{children}
</div>
</div> </div>
); );
} }

View File

@ -10,9 +10,8 @@
position: relative; position: relative;
background-color: var(--backgroundColor); background-color: var(--backgroundColor);
padding: 1px 0; padding: 1px 0;
margin-bottom: 50px; margin: 4px auto;
} }
.inputArea { .inputArea {
display: table; display: table;
width: calc(100% - 10px); width: calc(100% - 10px);

View File

@ -2,6 +2,7 @@ html {
box-sizing: border-box; box-sizing: border-box;
-ms-text-size-adjust: 100%; -ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
margin: 0;
} }
*, *:before, *:after { *, *:before, *:after {
box-sizing: inherit; box-sizing: inherit;
@ -10,8 +11,23 @@ html {
body { body {
font-family: 'Roboto', sans-serif; font-family: 'Roboto', sans-serif;
height: 100%; height: 100%;
background-color: #fafafa;
margin: 0;
}
header {
background-color: #fff;
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.22);
height: 54px;
position: fixed;
width: 100%;
z-index: 999;
} }
:global #root, :global #root > * { :global #root, :global #root > * {
height: 100%; height: 100%;
} }
h1, h2, h3, h4, h5, h6 {
margin: 0;
}