fade in like action for comments

This commit is contained in:
Raphael Sofaer 2011-07-11 16:53:14 -07:00
parent 0e664b2caf
commit 58e844eb1f
2 changed files with 20 additions and 7 deletions

View file

@ -19,14 +19,10 @@
.comment_info .comment_info
%time.timeago{:datetime => comment.created_at} %time.timeago{:datetime => comment.created_at}
= comment.created_at ? timeago(comment.created_at) : timeago(Time.now) = comment.created_at ? timeago(comment.created_at) : timeago(Time.now)
·
.likes .likes
= render "likes/likes_container", :target_id => comment.id, :likes_count => comment.likes_count = render "likes/likes_container", :target_id => comment.id, :likes_count => comment.likes_count
- if comment.likes_count > 0
·
- unless (defined?(@commenting_disabled) && @commenting_disabled) - unless (defined?(@commenting_disabled) && @commenting_disabled)
%span.like_action %span.like_action
= like_action(comment, current_user) = like_action(comment, current_user)

View file

@ -448,7 +448,7 @@ ul.as-selections
:top -1px :top -1px
.delete .delete
@include opacity(0.6) @include opacity(0.3)
:padding 5px :padding 5px
&:hover &:hover
@ -459,7 +459,8 @@ ul.as-selections
:right 12px :right 12px
.controls .controls
:display none @include transition(opacity)
@include opacity(0)
:z-index 6 :z-index 6
:color #999 :color #999
a a
@ -469,7 +470,7 @@ ul.as-selections
&:hover, .comment:hover &:hover, .comment:hover
> .controls > .controls
:display inline @include opacity(1)
.from .from
a a
@ -668,6 +669,17 @@ form.new_comment
.comment .comment
.like_action
@include transition(opacity)
@include opacity(0)
&:before
:content " · "
&:hover
.like_action
@include opacity(1)
.likes, .likes,
.likes_container .likes_container
:display inline :display inline
@ -685,6 +697,11 @@ form.new_comment
:width 9px :width 9px
:top 1px :top 1px
.likes
:margin
:left 5px
.stream.show .stream.show
ul.comments ul.comments
li li