Skip to content

Commit

Permalink
improve css, html-templates
Browse files Browse the repository at this point in the history
  • Loading branch information
denisskin committed Aug 3, 2015
1 parent 7d5d2a8 commit cfff672
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
15 changes: 15 additions & 0 deletions lib/components.css
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,21 @@ a:hover {
list-style: none;
min-height: 70px;
margin-top: 1.5em;
max-width: 500px;
display: table-row;
}
.comment-ico {
width: 50px;
display: table-cell;
}
.comment-ico .user-icon {
position: absolute;

}
.comment-body {
max-width: 500px;
display: table-cell;
padding-bottom: 2em;
}

/******* user icon *********/
Expand Down
13 changes: 7 additions & 6 deletions lib/pages/Comment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ var Comment = $class({
render: function() {
var element = this.props.element;
return(
<div className="comment media">
<div className="media-left">
<div className="comment">
<div className="comment-ico">
<UserIcon user={element.author} />
</div>
<div className="media-body">
<div className="comment-body">
<a name={element.name} />
<UserName user={element.author} /> &nbsp;
<span className="datetime">{element.datetime()}</span>
Expand All @@ -21,10 +21,11 @@ var Comment = $class({
var CommentNew = $class(Form, {
render: function() {
return (
<form onSubmit={this.submit} className="row">
<div className="col-sm-1">
<form onSubmit={this.submit} className="comment">
<div className="comment-ico">
&nbsp;
</div>
<div className="col-sm-7">
<div className="comment-body">
<div className="form-group">
{this.$inputText("text", {placeholder: "New comment"})}
</div>
Expand Down
4 changes: 3 additions & 1 deletion lib/pages/MainPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ var MainPage = $class(Page, {
return (
<div className="container">
<div className="row">
{this.children().map(this.$ChildItem)}
{this.children().sort(function(a, b){
return a.name > b.name
}).map(this.$ChildItem)}
</div>
{this.isAvailableToAdd() &&
<div className="row">
Expand Down

0 comments on commit cfff672

Please sign in to comment.