hexo-theme-butterfly/layout/includes/loading/fullpage-loading.pug
Jerry 8199e25215 feat: 重構本地搜索
feat: Algolia 搜索,點擊文章內容也會跳轉到相應頁面
fix: 修復 fullpage loading 顯示滾動條的 bug close #1235
fix: 修復 safari 下,搜索內容被系統搜索框遮擋的 bug
improvement: 手機 safari 橫屏時,網頁全屏幕顯示
improvement: 當沒有開啟 beautify 時, hr 顯示默認的樣式
2023-03-28 20:40:43 +08:00

29 lines
818 B
Plaintext

#loading-box
.loading-left-bg
.loading-right-bg
.spinner-box
.configure-border-1
.configure-core
.configure-border-2
.configure-core
.loading-word= _p('loading')
script.
const preloader = {
endLoading: () => {
document.body.style.overflow = '';
document.getElementById('loading-box').classList.add("loaded")
},
initLoading: () => {
document.body.style.overflow = 'hidden';
document.getElementById('loading-box').classList.remove("loaded")
}
}
preloader.initLoading()
window.addEventListener('load',()=> { preloader.endLoading() })
if (!{theme.pjax && theme.pjax.enable}) {
document.addEventListener('pjax:send', () => { preloader.initLoading() })
document.addEventListener('pjax:complete', () => { preloader.endLoading() })
}