Notion_Config

This commit is contained in:
tangly1024.com
2023-11-02 09:38:19 +08:00
parent cb3be01334
commit a6cc5a11f3
2 changed files with 4 additions and 4 deletions

View File

@@ -4,7 +4,6 @@ import Typed from 'typed.js'
import CONFIG from '../config'
import NavButtonGroup from './NavButtonGroup'
import { useGlobal } from '@/lib/global'
import BLOG from '@/blog.config'
import LazyImage from '@/components/LazyImage'
import { siteConfig } from '@/lib/config'
@@ -21,13 +20,14 @@ const Hero = props => {
const scrollToWrapper = () => {
window.scrollTo({ top: wrapperTop, behavior: 'smooth' })
}
const GREETING_WORDS = siteConfig('GREETING_WORDS').split(',')
useEffect(() => {
updateHeaderHeight()
if (!typed && window && document.getElementById('typed')) {
changeType(
new Typed('#typed', {
strings: BLOG.GREETING_WORDS.split(','),
strings: GREETING_WORDS,
typeSpeed: 200,
backSpeed: 100,
backDelay: 400,

View File

@@ -3,7 +3,6 @@ import { useEffect, useState } from 'react'
import Typed from 'typed.js'
import CONFIG from '../config'
import { useGlobal } from '@/lib/global'
import BLOG from '@/blog.config'
import LazyImage from '@/components/LazyImage'
import { siteConfig } from '@/lib/config'
@@ -17,13 +16,14 @@ const Hero = props => {
const [typed, changeType] = useState()
const { siteInfo } = props
const { locale } = useGlobal()
const GREETING_WORDS = siteConfig('GREETING_WORDS').split(',')
useEffect(() => {
updateHeaderHeight()
if (!typed && window && document.getElementById('typed')) {
changeType(
new Typed('#typed', {
strings: BLOG.GREETING_WORDS.split(','),
strings: GREETING_WORDS,
typeSpeed: 200,
backSpeed: 100,
backDelay: 400,