max-width: 1000px;
margin: 0 auto;
}
+
+div#loading-page {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ height: 5px;
+ background: $secondary;
+ z-index: 100;
+ animation-name: load_animation;
+ animation-duration: 6000ms;
+ animation-timing-function: ease-out;
+ transition: opacity 200ms linear;
+ &.fade {
+ opacity: 0;
+ }
+}
+
+@keyframes load_animation {
+ 0% { right: 100%; }
+ 100% { right: 0%; }
+}
};
var loadPage_request = null;
afterLoad = function(html, textStatus, XMLHttpRequest) {
+ $('#loading-page').addClass('fade');
loadPage_request = null;
if (textStatus == "error") {
doLog('Sorry! And error occur when loading page content','error');
if (loadPage_request !== null) {
loadPage_request.abort();
}
+ $('#loading-page').remove();
+ $('<div id="loading-page"></div>').prependTo($('#All'));
loadPage_request = $.ajax({
url: href,
success: afterLoad,