mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-30 15:10:11 +00:00
theme heo wowjs
This commit is contained in:
@@ -42,7 +42,7 @@ const CONFIG = {
|
||||
STARTER_FEATURE_2_BUTTON_URL: 'https://docs.tangly1024.com/article/notion-next-themes', // 特性2
|
||||
|
||||
STARTER_FEATURE_3_TITLE_1: '优秀的性能', // 特性3
|
||||
STARTER_FEATURE_3_TEXT_1: '基于NextJS开发,更快的相应速度,更好的SEO', // 特性3
|
||||
STARTER_FEATURE_3_TEXT_1: '基于NextJS开发,更快的响应速度,更好的SEO', // 特性3
|
||||
STARTER_FEATURE_3_BUTTON_TEXT: '了解更多', // 特性3
|
||||
STARTER_FEATURE_3_BUTTON_URL: 'https://docs.tangly1024.com/article/next-js', // 特性3
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* 3. 您可在此网站找到更多喜欢的组件 https://www.tailwind-kit.com/
|
||||
*/
|
||||
import { useRouter } from 'next/router'
|
||||
import { isBrowser, loadExternalResource } from '@/lib/utils'
|
||||
import { isBrowser } from '@/lib/utils'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import CONFIG from './config'
|
||||
import NotionPage from '@/components/NotionPage'
|
||||
@@ -36,19 +36,7 @@ import { Banner } from './components/Banner'
|
||||
import { SignInForm } from './components/SignInForm'
|
||||
import { SignUpForm } from './components/SignUpForm'
|
||||
import Link from 'next/link'
|
||||
|
||||
/**
|
||||
* 一些外部js
|
||||
*/
|
||||
const loadExternal = async () => {
|
||||
await loadExternalResource('https://cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js', 'js');
|
||||
// 配合animatecss 实现延时滚动动画,和AOS动画相似
|
||||
const WOW = window.WOW;
|
||||
console.log('加载WOW动画', WOW)
|
||||
if (WOW) {
|
||||
new WOW().init();
|
||||
}
|
||||
};
|
||||
import { loadWowJS } from '@/lib/wow'
|
||||
|
||||
/**
|
||||
* 布局框架
|
||||
@@ -61,8 +49,9 @@ const loadExternal = async () => {
|
||||
const LayoutBase = (props) => {
|
||||
const { children } = props
|
||||
|
||||
// 加载wow动画
|
||||
useEffect(() => {
|
||||
loadExternal()
|
||||
loadWowJS()
|
||||
}, [])
|
||||
|
||||
return <div id='theme-starter' className={`${siteConfig('FONT_STYLE')} min-h-screen flex flex-col dark:bg-black scroll-smooth`}>
|
||||
|
||||
Reference in New Issue
Block a user