small tweaks

This commit is contained in:
Sacha Greif 2016-02-19 18:38:39 +09:00
parent d72d78990c
commit 4746bcd610
5 changed files with 28 additions and 18 deletions

View file

@ -13,24 +13,18 @@ body{
border: 1px #ccc solid;
}
.post-views{
background: #efefef;
border: 1px #ddd solid;
padding: 10px;
.post-views, .logo, .nav, .alt-accounts-log-in-buttons, .post-categories, .post-commenters{
margin-bottom: 15px;
}
.post-categories, .post-commenters{
margin-bottom: 15px;
}
.post-categories ul, .post-commenters ul{
.post-views ul, .categories ul, .post-categories ul, .post-commenters ul{
list-style-type: none;
margin: 0;
padding: 0;
}
.post-categories li, .post-commenters li{
.post-views li, .categories li, .post-categories li, .post-commenters li{
display: inline-block;
margin-right: 5px;
border: 1px solid #ddd;
@ -38,6 +32,17 @@ body{
background: #efefef;
}
.post-list-content{
border-top: 2px solid #eee;
padding-top: 15px;
margin-top: 15px;
}
.post-item{
border-bottom: 2px solid #eee;
padding-bottom: 15px;
margin-bottom: 15px;
}
.comment-node{
border-left: 10px #efefef solid;
padding-left: 10px;

View file

@ -1,11 +1,14 @@
const CategoriesList = props => {
return (
<ul className="post-categories">
{props.results.map(category =>
<li key={category._id} className="post-category"><a href={FlowRouter.extendPathWithQueryParams("postDefault", {}, {cat: category.slug})}>{category.name}</a></li>
)}
</ul>
<div className="categories">
<h4>Categories</h4>
<ul>
{props.results.map(category =>
<li key={category._id} className="post-category"><a href={FlowRouter.extendPathWithQueryParams("postDefault", {}, {cat: category.slug})}>{category.name}</a></li>
)}
</ul>
</div>
)
};

View file

@ -32,7 +32,7 @@ const PostItem = React.createClass({
const post = this.props.post;
return (
<div className="post" style={{borderBottom: "2px solid #eee", paddingBottom: "10px", marginBottom: "10px"}}>
<div className="post-item">
<h3 className="post-title"><a href={Posts.getLink(post)} target={Posts.getLinkTarget(post)}>{post.title}</a></h3>
<p>{Users.getDisplayName(post.user)}, {moment(post.postedAt).fromNow()}, {post.commentCount} comments</p>

View file

@ -6,7 +6,9 @@ const PostList = props => {
return (
<div className="postList">
<PostViews />
{props.results.map(post => <PostItem post={post} currentUser={props.currentUser} key={post._id}/>)}
<div className="post-list-content">
{props.results.map(post => <PostItem post={post} currentUser={props.currentUser} key={post._id}/>)}
</div>
{props.hasMore ? (props.ready ? <LoadMore {...props}/> : <PostsLoading/>) : <NoMorePosts/>}
</div>
)

View file

@ -9,8 +9,8 @@ const PostViews = props => {
return (
<div className="post-views">
<h4>Sort By:</h4>
<ul>
<li>Sort by:</li>
{views.map(view =>
<li key={view}><a href={FlowRouter.extendPathWithQueryParams("posts.list", {}, {view: view})}>{view}</a></li>
)}