From a6cc5a11f37c8e2232cf80050dbe300874ad15cd Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Thu, 2 Nov 2023 09:38:19 +0800 Subject: [PATCH] Notion_Config --- themes/hexo/components/Hero.js | 4 ++-- themes/matery/components/Hero.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/hexo/components/Hero.js b/themes/hexo/components/Hero.js index b6a32b8f..f279f18e 100644 --- a/themes/hexo/components/Hero.js +++ b/themes/hexo/components/Hero.js @@ -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, diff --git a/themes/matery/components/Hero.js b/themes/matery/components/Hero.js index bb8d65ff..5ca4d14d 100644 --- a/themes/matery/components/Hero.js +++ b/themes/matery/components/Hero.js @@ -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,