fix: 移除向后兼容代码并修复黑幕样式
- 移除 showLoadingOverlay 和 hideLoadingOverlay 向后兼容函数 - 直接使用 PageLoader.show() 和 PageLoader.hide() - 重构黑幕样式,添加文章内容选择器支持 - 优化夜间模式黑幕颜色(#1a1a1a) - 添加 article .entry-content 和 .article-content 选择器 - 确保黑幕在所有文章容器中正常显示 - 改进代码结构和注释
This commit is contained in:
@@ -3452,17 +3452,6 @@ const PageLoader = (function() {
|
||||
destroy: destroy
|
||||
};
|
||||
})();
|
||||
|
||||
/**
|
||||
* 向后兼容的函数
|
||||
*/
|
||||
function showLoadingOverlay() {
|
||||
PageLoader.show();
|
||||
}
|
||||
|
||||
function hideLoadingOverlay() {
|
||||
PageLoader.hide();
|
||||
}
|
||||
function startPageTransition() {
|
||||
document.documentElement.classList.add('page-transition-enter');
|
||||
pjaxContainers.forEach(function(selector) {
|
||||
@@ -3510,7 +3499,7 @@ $(document).pjax(
|
||||
NProgress.remove();
|
||||
NProgress.start();
|
||||
pjaxLoading = true;
|
||||
showLoadingOverlay();
|
||||
PageLoader.show();
|
||||
}).on('pjax:afterGetContainers', function(e, f, g) {
|
||||
pjaxScrollTop = 0;
|
||||
if ($("html").hasClass("banner-as-cover")){
|
||||
@@ -3547,7 +3536,7 @@ $(document).pjax(
|
||||
startPageTransition();
|
||||
activatePageTransition();
|
||||
setTimeout(function() {
|
||||
hideLoadingOverlay();
|
||||
PageLoader.hide();
|
||||
endPageTransition();
|
||||
}, 320);
|
||||
|
||||
@@ -3621,7 +3610,7 @@ $(document).pjax(
|
||||
|
||||
NProgress.done();
|
||||
}).on('pjax:error', function() {
|
||||
hideLoadingOverlay();
|
||||
PageLoader.hide();
|
||||
endPageTransition();
|
||||
pjaxLoading = false;
|
||||
}).on('pjax:end', function() {
|
||||
|
||||
Reference in New Issue
Block a user