mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Success notifications now fade out after 3 seconds
This commit is contained in:
parent
35d96e1560
commit
db1d9104ad
3 changed files with 23 additions and 1 deletions
|
@ -56,6 +56,10 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on('animationend', '.js-notification', function () {
|
||||||
|
$(this).hide();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Example of how to add a persistent notification.
|
* Example of how to add a persistent notification.
|
||||||
|
|
|
@ -870,6 +870,11 @@ nav {
|
||||||
@extend %notification;
|
@extend %notification;
|
||||||
@include icon($i-success);
|
@include icon($i-success);
|
||||||
background: $green;
|
background: $green;
|
||||||
|
|
||||||
|
@include animation(fade-out 1s linear);
|
||||||
|
@include animation-delay(3s);
|
||||||
|
@include animation-iteration-count(1);
|
||||||
|
@include animation-fill-mode(forwards);
|
||||||
}
|
}
|
||||||
|
|
||||||
.notification-error {
|
.notification-error {
|
||||||
|
|
|
@ -178,4 +178,17 @@ $green: #9FBB58;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* =============================================================================
|
||||||
|
Animations
|
||||||
|
============================================================================= */
|
||||||
|
|
||||||
|
@include keyframes(fade-out) {
|
||||||
|
from {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue