Further tweaks to post layout

Move footer after actions so that we'll be able to have larger things
in the footer (e.g. Answers) without pushing down the controls.
This commit is contained in:
Toby Zerner 2015-09-18 14:38:57 +09:30
parent 362afd1bd2
commit 8d5cbd6802
3 changed files with 18 additions and 16 deletions

View File

@ -48,8 +48,7 @@ export default class CommentPost extends Post {
{this.isEditing()
? <div className="Post-preview" config={this.configPreview.bind(this)}/>
: m.trust(this.props.post.contentHtml())}
</div>,
<footer className="Post-footer"><ul>{listItems(this.footerItems().toArray())}</ul></footer>
</div>
];
}
@ -175,13 +174,4 @@ export default class CommentPost extends Post {
return items;
}
/**
* Build an item list for the post's footer.
*
* @return {ItemList}
*/
footerItems() {
return new ItemList();
}
}

View File

@ -62,6 +62,7 @@ export default class Post extends Component {
</li> : ''}
</ul>
</aside>
<footer className="Post-footer"><ul>{listItems(this.footerItems().toArray())}</ul></footer>
</div>
);
})()}
@ -95,4 +96,13 @@ export default class Post extends Component {
actionItems() {
return new ItemList();
}
/**
* Build an item list for the post's footer.
*
* @return {ItemList}
*/
footerItems() {
return new ItemList();
}
}

View File

@ -2,7 +2,7 @@
// Posts
.Post {
padding: 20px 20px 25px;
padding: 20px;
margin: -1px -20px;
transition: 0.2s box-shadow, top 0.2s, opacity 0.2s;
position: relative;
@ -234,7 +234,7 @@
}
}
.Post-footer {
margin-top: 20px;
margin-top: 5px;
> ul {
> li {
@ -247,16 +247,18 @@
}
}
.Post-actions {
margin-top: -5px;
float: right;
margin-top: -10px;
position: relative;
z-index: 1;
.transition(opacity 0.2s);
.EventPost &, .Post--hidden & {
.EventPost &, .Post--hidden:not(.revealContent) & {
margin-top: -27px;
margin-bottom: -15px;
}
@media @tablet-up {
margin-bottom: -15px;
opacity: 0;
}