0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Success notifications now fade out after 3 seconds

This commit is contained in:
Matthew Harrison-Jones 2013-07-22 10:59:16 +01:00 committed by ErisDS
parent 32b245c53c
commit 94ae164086
3 changed files with 23 additions and 1 deletions

View file

@ -56,6 +56,10 @@
});
});
$(document).on('animationend', '.js-notification', function () {
$(this).hide();
});
/**
* Example of how to add a persistent notification.

View file

@ -870,6 +870,11 @@ nav {
@extend %notification;
@include icon($i-success);
background: $green;
@include animation(fade-out 1s linear);
@include animation-delay(3s);
@include animation-iteration-count(1);
@include animation-fill-mode(forwards);
}
.notification-error {

View file

@ -178,4 +178,17 @@ $green: #9FBB58;
text-decoration: none;
}
}
}
}
/* =============================================================================
Animations
============================================================================= */
@include keyframes(fade-out) {
from {
opacity: 1;
}
to {
opacity: 0;
}
}