mirror of
https://github.com/flarum/framework.git
synced 2025-03-03 21:36:31 +08:00
Tweak user card UI
This commit is contained in:
parent
abf49fd07a
commit
447cf1bcb1
@ -50,12 +50,13 @@ export default class PostHeaderUser extends Component {
|
|||||||
component.showCard(true);
|
component.showCard(true);
|
||||||
m.redraw();
|
m.redraw();
|
||||||
setTimeout(() => component.$('.user-card').addClass('in'));
|
setTimeout(() => component.$('.user-card').addClass('in'));
|
||||||
}, 250);
|
}, 500);
|
||||||
}).bind('mouseout', '> a, .user-card', function() {
|
}).bind('mouseout', '> a, .user-card', function() {
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
timeout = setTimeout(function() {
|
timeout = setTimeout(function() {
|
||||||
component.$('.user-card').removeClass('in').one('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function() {
|
component.$('.user-card').removeClass('in').one('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function() {
|
||||||
component.showCard(false);
|
component.showCard(false);
|
||||||
|
m.redraw();
|
||||||
});
|
});
|
||||||
}, 250);
|
}, 250);
|
||||||
});
|
});
|
||||||
|
@ -203,12 +203,15 @@
|
|||||||
|
|
||||||
& .user-card {
|
& .user-card {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 100%;
|
top: -10px;
|
||||||
|
left: -100px;
|
||||||
z-index: @zindex-popover;
|
z-index: @zindex-popover;
|
||||||
.transition(~"opacity 0.2s, margin-top 0.2s");
|
.transition(~"opacity 0.2s, transform 0.2s");
|
||||||
|
transform: scale(0.95);
|
||||||
|
transform-origin: left top;
|
||||||
|
|
||||||
&.in {
|
&.in {
|
||||||
margin-top: 5px;
|
transform: scale(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user