站点信息读取Notion数据

This commit is contained in:
tangly1024
2022-03-30 15:34:25 +08:00
parent 914e9a108f
commit 53c004843e
61 changed files with 322 additions and 463 deletions

View File

@@ -1,12 +1,12 @@
import Link from 'next/link'
import BLOG from '@/blog.config'
import React from 'react'
const Logo = () => {
const Logo = props => {
const { siteInfo } = props
return <Link href='/' passHref>
<div className='flex flex-col justify-center items-center cursor-pointer bg-black space-y-3 h-32 font-bold'>
<div className='font-serif text-xl text-white'> {BLOG.TITLE}</div>
<div className='text-sm text-gray-300 font-light'> {BLOG.DESCRIPTION}</div>
<div className='font-serif text-xl text-white'> {siteInfo?.title}</div>
<div className='text-sm text-gray-300 font-light'> {siteInfo?.description}</div>
</div>
</Link>
}

View File

@@ -18,7 +18,7 @@ import CONFIG_NEXT from '../config_next'
* @returns {JSX.Element}
* @constructor
*/
const SideAreaLeft = (props) => {
const SideAreaLeft = props => {
const { post, slot, postCount } = props
const { locale } = useGlobal()
const showToc = post && post.toc && post.toc.length > 1
@@ -27,7 +27,7 @@ const SideAreaLeft = (props) => {
<section className='w-60'>
{/* 菜单 */}
<section className='shadow hidden lg:block mb-5 pb-4 bg-white dark:bg-gray-800 hover:shadow-xl duration-200'>
<Logo/>
<Logo {...props}/>
<div className='pt-2 px-2 font-sans'>
<MenuButtonGroup allowCollapse={true} {...props} />
</div>

View File

@@ -98,7 +98,7 @@ const TopNav = (props) => {
</div>
<div className='flex'>
<Logo/>
<Logo {...props}/>
</div>
{/* 右侧功能 */}