Skip to content

Commit

Permalink
Flux - 33 - CSS Animations
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenGrider committed Jul 6, 2015
1 parent a3a6207 commit 9bfde96
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
13 changes: 13 additions & 0 deletions imgur-client/sass/topic.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
.topic {
text-align: center;

.image-preview {
animation: fadein .65s ease-out;

@keyframes fadein {
0% {
opacity: 0;
}
100% {
opacity: 1.0;
}
}
}
}
16 changes: 12 additions & 4 deletions imgur-client/src/components/comment-box.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@ var React = require('react');

module.exports = React.createClass({
render: function(){
return <div>
I am a comment box.
{this.props.comments}
</div>
return <ul className="list-group">
{this.renderComments()}
</ul>
},
renderComments: function() {
return this.props.comments.slice(0, 20).map(function(comment){
return <li className="list-group-item comment-box" key={comment.id}>
<span className="badge">{comment.ups}</span>
<h5>{comment.author}</h5>
{comment.comment}
</li>
})
}
});

0 comments on commit 9bfde96

Please sign in to comment.