mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-04 07:26:47 +00:00
HEO添加加载动画
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
export default function LoadingCover () {
|
||||
return (<div id="loading-cover" className={'md:-mt-20 flex-grow dark:text-white text-black animate__animated animate__fadeIn flex flex-col justify-center z-50 w-full h-screen container mx-auto'}>
|
||||
<div className="mx-auto">
|
||||
<i className="fas fa-spinner animate-spin"/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
const CONFIG = {
|
||||
HEO_HOME_POST_TWO_COLS: true, // 首页博客两列显示,若为false则只显示一列
|
||||
HEO_LOADING_COVER: true, // 页面加载的遮罩动画
|
||||
|
||||
HEO_HOME_BANNER_ENABLE: true,
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import Comment from '@/components/Comment'
|
||||
import { AdSlot } from '@/components/GoogleAdsense'
|
||||
import { HashTag } from '@/components/HeroIcons'
|
||||
import LazyImage from '@/components/LazyImage'
|
||||
import LoadingCover from '@/components/LoadingCover'
|
||||
import replaceSearchResult from '@/components/Mark'
|
||||
import NotionPage from '@/components/NotionPage'
|
||||
import ShareBar from '@/components/ShareBar'
|
||||
@@ -82,6 +83,7 @@ const LayoutBase = props => {
|
||||
false,
|
||||
CONFIG
|
||||
)
|
||||
const HEO_LOADING_COVER = siteConfig('HEO_LOADING_COVER', true, CONFIG)
|
||||
|
||||
// 加载wow动画
|
||||
useEffect(() => {
|
||||
@@ -121,6 +123,8 @@ const LayoutBase = props => {
|
||||
|
||||
{/* 页脚 */}
|
||||
<Footer title={siteConfig('TITLE')} />
|
||||
|
||||
{HEO_LOADING_COVER && <LoadingCover />}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user