fade in aspect badges on stream
This commit is contained in:
parent
55fa1646c7
commit
6ca0b0014b
3 changed files with 23 additions and 8 deletions
|
|
@ -19,11 +19,13 @@
|
||||||
|
|
||||||
- if post.public?
|
- if post.public?
|
||||||
%span.arrow ➔
|
%span.arrow ➔
|
||||||
|
%span.aspect_badges
|
||||||
%span.aspect_badge.public
|
%span.aspect_badge.public
|
||||||
= t('the_world')
|
= t('the_world')
|
||||||
|
|
||||||
- elsif person.owner_id == current_user.id
|
- elsif person.owner_id == current_user.id
|
||||||
%span.arrow ➔
|
%span.arrow ➔
|
||||||
|
%span.aspect_badges
|
||||||
= aspect_badges(aspects_with_post(all_aspects, post))
|
= aspect_badges(aspects_with_post(all_aspects, post))
|
||||||
|
|
||||||
= render 'status_messages/status_message', :post => post, :photos => photos
|
= render 'status_messages/status_message', :post => post, :photos => photos
|
||||||
|
|
|
||||||
|
|
@ -51,15 +51,20 @@ var Stream = {
|
||||||
|
|
||||||
// fade in controls
|
// fade in controls
|
||||||
$stream.delegate(".stream_element", "mouseenter", function(evt) {
|
$stream.delegate(".stream_element", "mouseenter", function(evt) {
|
||||||
var element = $(this),
|
var controls = $(this).find('.controls'),
|
||||||
controls = element.find('.controls');
|
badges = $(this).find('.aspect_badges');
|
||||||
|
|
||||||
controls.fadeIn(100);
|
controls.fadeIn(100);
|
||||||
|
controls.fadeIn(100);
|
||||||
|
badges.fadeTo(100,1);
|
||||||
});
|
});
|
||||||
$stream.delegate(".stream_element", "mouseleave", function(evt) {
|
$stream.delegate(".stream_element", "mouseleave", function(evt) {
|
||||||
var element = $(this),
|
var controls = $(this).find('.controls'),
|
||||||
controls = element.find('.controls');
|
badges = $(this).find('.aspect_badges');
|
||||||
|
|
||||||
controls.show()
|
controls.show()
|
||||||
.fadeOut(100);
|
.fadeOut(50);
|
||||||
|
badges.fadeTo(50,0.5);
|
||||||
});
|
});
|
||||||
|
|
||||||
// reshare button action
|
// reshare button action
|
||||||
|
|
|
||||||
|
|
@ -2050,6 +2050,14 @@ h3,h4
|
||||||
.avatar
|
.avatar
|
||||||
:float left
|
:float left
|
||||||
.arrow,
|
.arrow,
|
||||||
|
|
||||||
|
.stream_element
|
||||||
|
.aspect_badges
|
||||||
|
:opacity 0.5
|
||||||
|
&:hover
|
||||||
|
.aspect_badges
|
||||||
|
:opacity 1
|
||||||
|
|
||||||
.aspect_badge
|
.aspect_badge
|
||||||
:position relative
|
:position relative
|
||||||
:margin
|
:margin
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue