diff --git a/Isekai.class.php b/Isekai.class.php index 072e64a..51a362b 100644 --- a/Isekai.class.php +++ b/Isekai.class.php @@ -39,11 +39,35 @@ class Isekai { $outputPage->addModules('ext.fontawesome'); //$outputPage->addModules('ext.treeview'); + // 加载动画,三秒内未加载完成则强制显示 + if ($outputPage->getSkin()->getSkinName() === 'timeless') { + $outputPage->addHeadItem( + 'loading-animate-script', + << + var c = document.documentElement.classList; + c.add('content-loading'); + setTimeout(function() { + c.remove('content-loading'); + c.add('content-loaded'); + }, 3000); + document.addEventListener('DOMContentLoaded', function() { + var b = getComputedStyle(document.body, null).backgroundColor; + var a = document.createElement('div'); + a.classList.add('page-loading-spinner'); + a.innerHTML = '
'; + document.body.appendChild(a); + }); + +HTML + ); + } + // 百度统计 $outputPage->addHeadItem( 'baiduhm', << +