Skip to content

Commit

Permalink
fade in like action for comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Sofaer committed Jul 11, 2011
1 parent 0e664b2 commit 58e844e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
4 changes: 0 additions & 4 deletions app/views/comments/_comment.html.haml
Expand Up @@ -19,14 +19,10 @@
.comment_info
%time.timeago{:datetime => comment.created_at}
= comment.created_at ? timeago(comment.created_at) : timeago(Time.now)
·

.likes
= render "likes/likes_container", :target_id => comment.id, :likes_count => comment.likes_count

- if comment.likes_count > 0
·

- unless (defined?(@commenting_disabled) && @commenting_disabled)
%span.like_action
= like_action(comment, current_user)
Expand Down
23 changes: 20 additions & 3 deletions public/stylesheets/sass/application.sass
Expand Up @@ -448,7 +448,7 @@ ul.as-selections
:top -1px

.delete
@include opacity(0.6)
@include opacity(0.3)
:padding 5px

&:hover
Expand All @@ -459,7 +459,8 @@ ul.as-selections
:right 12px

.controls
:display none
@include transition(opacity)
@include opacity(0)
:z-index 6
:color #999
a
Expand All @@ -469,7 +470,7 @@ ul.as-selections

&:hover, .comment:hover
> .controls
:display inline
@include opacity(1)

.from
a
Expand Down Expand Up @@ -668,6 +669,17 @@ form.new_comment


.comment
.like_action
@include transition(opacity)
@include opacity(0)

&:before
:content " · "

&:hover
.like_action
@include opacity(1)

.likes,
.likes_container
:display inline
Expand All @@ -685,6 +697,11 @@ form.new_comment
:width 9px
:top 1px

.likes
:margin
:left 5px


.stream.show
ul.comments
li
Expand Down

0 comments on commit 58e844e

Please sign in to comment.