matery 主题一闪而过的title

This commit is contained in:
tangly1024.com
2024-04-29 10:08:39 +08:00
parent 27b0eed1d9
commit 055236d941
2 changed files with 14 additions and 5 deletions

View File

@@ -9,7 +9,8 @@ import CONFIG from '../config'
let wrapperTop = 0
/**
*
* 首页英雄区
* 是一张大图,带个居中按钮
* @returns 头图
*/
const Hero = props => {
@@ -17,7 +18,6 @@ const Hero = props => {
const { siteInfo } = props
const { locale } = useGlobal()
const GREETING_WORDS = siteConfig('GREETING_WORDS').split(',')
useEffect(() => {
updateHeaderHeight()
if (!typed && window && document.getElementById('typed')) {
@@ -61,7 +61,7 @@ const Hero = props => {
<div className='text-white absolute flex flex-col h-full items-center justify-center w-full '>
{/* 站点标题 */}
<div className='text-4xl md:text-5xl shadow-text'>
{siteConfig('TITLE')}
{siteInfo?.title || siteConfig('TITLE')}
</div>
{/* 站点欢迎语 */}
<div className='mt-2 h-12 items-center text-center shadow-text text-white text-lg'>

View File

@@ -1,11 +1,20 @@
import { siteConfig } from '@/lib/config'
import Link from 'next/link'
/**
* 站点logo
* 这里默认只支持纯文字
* @param {*} props
* @returns
*/
const Logo = props => {
const { siteInfo } = props
return (
<Link href='/' passHref legacyBehavior>
<div className='flex flex-col justify-center items-center cursor-pointer space-y-3'>
<div className=' text-lg p-1.5 rounded dark:border-white hover:scale-110 transform duration-200'> {siteConfig('TITLE') }</div>
<div className=' text-lg p-1.5 rounded dark:border-white hover:scale-110 transform duration-200'>
{' '}
{siteInfo?.title || siteConfig('TITLE')}
</div>
</div>
</Link>
)