Merge branch 'master' into class-properties-initializers

This commit is contained in:
Andrey Okonetchnikov 2016-10-03 16:41:15 +02:00
commit 5ba0c46aee
8 changed files with 58 additions and 45 deletions

View File

@ -17,9 +17,8 @@ export default class EntryListing extends React.Component {
{ mq: '495px', columns: 2, gutter: 15 }, { mq: '495px', columns: 2, gutter: 15 },
{ mq: '750px', columns: 3, gutter: 15 }, { mq: '750px', columns: 3, gutter: 15 },
{ mq: '1005px', columns: 4, gutter: 15 }, { mq: '1005px', columns: 4, gutter: 15 },
{ mq: '1260px', columns: 5, gutter: 15 }, { mq: '1515px', columns: 5, gutter: 15 },
{ mq: '1515px', columns: 6, gutter: 15 }, { mq: '1770px', columns: 6, gutter: 15 },
{ mq: '1770px', columns: 7, gutter: 15 },
] ]
}; };

View File

@ -24,25 +24,26 @@
.card { .card {
width: 100% !important; width: 100% !important;
margin: 7px 0; margin: 7px 0 0 10px;
padding: 7px 0;
}
& h2 { .cardHeading {
font-size: 17px; font-size: 17px;
& small { & small {
font-weight: normal; font-weight: normal;
}
} }
}
& p { .cardText {
color: #555; color: #555;
font-size: 12px; font-size: 12px;
margin-top: 5px; margin-top: 5px;
} }
& button { .button {
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
}
} }

View File

@ -53,10 +53,10 @@ class UnpublishedListing extends React.Component {
<DragSource key={slug} slug={slug} collection={collection} ownStatus={ownStatus}> <DragSource key={slug} slug={slug} collection={collection} ownStatus={ownStatus}>
<div className={styles.drag}> <div className={styles.drag}>
<Card className={styles.card}> <Card className={styles.card}>
<h2><Link to={link}>{entry.getIn(['data', 'title'])}</Link> <small>by {author}</small></h2> <span className={styles.cardHeading}><Link to={link}>{entry.getIn(['data', 'title'])}</Link> <small>by {author}</small></span>
<p>Last updated: {timeStamp} by {entry.getIn(['metaData', 'user'])}</p> <p className={styles.cardText}>Last updated: {timeStamp} by {entry.getIn(['metaData', 'user'])}</p>
{(ownStatus === status.last()) && {(ownStatus === status.last()) &&
<button onClick={this.requestPublish.bind(this, collection, slug, status)}>Publish now</button> <button className={styles.button} onClick={this.requestPublish.bind(this, collection, slug, status)}>Publish now</button>
} }
</Card> </Card>
</div> </div>

View File

@ -4,7 +4,17 @@
.nav { .nav {
display: block; display: block;
padding: 1rem; padding: 1rem;
& .heading {
border: none;
}
} }
.main { .main {
padding-top: 54px; padding-top: 54px;
} }
.navDrawer {
max-width: 240px !important;
& .drawerContent {
max-width: 240px !important;
}
}

View File

@ -20,7 +20,7 @@ import styles from './App.css';
class App extends React.Component { class App extends React.Component {
state = { state = {
navDrawerIsVisible: false navDrawerIsVisible: true
}; };
componentDidMount() { componentDidMount() {
@ -137,10 +137,11 @@ class App extends React.Component {
<NavDrawer <NavDrawer
active={navDrawerIsVisible} active={navDrawerIsVisible}
scrollY scrollY
permanentAt="md" permanentAt={navDrawerIsVisible ? 'lg' : null}
theme={styles}
> >
<nav className={styles.nav}> <nav className={styles.nav}>
<h1>Collections</h1> <h1 className={styles.heading}>Collections</h1>
<Navigation type='vertical'> <Navigation type='vertical'>
{ {
collections.valueSeq().map(collection => collections.valueSeq().map(collection =>
@ -164,7 +165,7 @@ class App extends React.Component {
onCreateEntryClick={createNewEntryInCollection} onCreateEntryClick={createNewEntryInCollection}
toggleNavDrawer={this.toggleNavDrawer} toggleNavDrawer={this.toggleNavDrawer}
/> />
<div className={`${styles.alignable} ${styles.main}`}> <div className={styles.main}>
{children} {children}
</div> </div>
</Panel> </Panel>

View File

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

View File

@ -37,7 +37,7 @@ class DashboardPage extends React.Component {
} }
return <div className={styles.alignable}> return <div className={styles.root}>
{entries ? {entries ?
<EntryListing collection={collection} entries={entries}/> <EntryListing collection={collection} entries={entries}/>
: :

View File

@ -29,12 +29,14 @@ export default function CollectionPageHOC(CollectionPage) {
if (!isEditorialWorkflow) return super.render(); if (!isEditorialWorkflow) return super.render();
return ( return (
<div className={styles.alignable}> <div>
<UnpublishedListing <div className={styles.root}>
entries={unpublishedEntries} <UnpublishedListing
handleChangeStatus={updateUnpublishedEntryStatus} entries={unpublishedEntries}
handlePublish={publishUnpublishedEntry} handleChangeStatus={updateUnpublishedEntryStatus}
/> handlePublish={publishUnpublishedEntry}
/>
</div>
{super.render()} {super.render()}
</div> </div>
); );