28 lines
790 B
Plaintext
28 lines
790 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 = 'auto';
|
|
document.getElementById('loading-box').classList.add("loaded")
|
|
},
|
|
initLoading: () => {
|
|
document.body.style.overflow = '';
|
|
document.getElementById('loading-box').classList.remove("loaded")
|
|
|
|
}
|
|
}
|
|
window.addEventListener('load',()=> { preloader.endLoading() })
|
|
|
|
if (!{theme.pjax && theme.pjax.enable}) {
|
|
document.addEventListener('pjax:send', () => { preloader.initLoading() })
|
|
document.addEventListener('pjax:complete', () => { preloader.endLoading() })
|
|
} |