mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-01 15:10:14 +00:00
部分配置siteConfig化
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import Link from 'next/link'
|
||||
import { useGlobal } from '@/lib/global'
|
||||
import CONFIG from '../config'
|
||||
import BLOG from '@/blog.config'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import { formatDateFmt } from '@/lib/formatDate'
|
||||
|
||||
export const ArticleInfo = (props) => {
|
||||
@@ -19,7 +19,7 @@ export const ArticleInfo = (props) => {
|
||||
|
||||
{post?.type !== 'Page' && (<>
|
||||
<div className="mb-4 text-sm text-gray-700 dark:text-gray-300">
|
||||
<span> <i className="fa-regular fa-user"></i> <a href={CONFIG.AUTHOR_LINK}>{BLOG.AUTHOR}</a></span>
|
||||
<span> <i className="fa-regular fa-user"></i> <a href={CONFIG.AUTHOR_LINK}>{siteConfig('AUTHOR')}</a></span>
|
||||
<span> - <i className="fa-regular fa-clock"></i> {post?.publishDay}</span>
|
||||
{post?.category && <span> - <i className="fa-regular fa-folder"></i> <a href={`/category/${post?.category}`} className="hover:text-red-400 transition-all duration-200">{post?.category}</a></span>}
|
||||
{post?.tags && post?.tags?.length > 0 && post?.tags.map(t => <span key={t}> / <Link href={`/tag/${t}`}><span className=' hover:text-red-400 transition-all duration-200'>{t}</span></Link></span>)}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Link from 'next/link'
|
||||
import CONFIG from '../config'
|
||||
import TwikooCommentCount from '@/components/TwikooCommentCount'
|
||||
import { formatDateFmt } from '@/lib/formatDate'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
|
||||
export const BlogItem = props => {
|
||||
const { post } = props
|
||||
@@ -22,7 +23,7 @@ export const BlogItem = props => {
|
||||
|
||||
<div className="mb-5 text-md text-gray-700 dark:text-gray-300 flex-wrap flex leading-6">
|
||||
<div className='space-x-2'>
|
||||
<span> <a href={CONFIG.AUTHOR_LINK} className='p-1 hover:text-red-400 transition-all duration-200'><i className="fa-regular fa-user"></i> {BLOG.AUTHOR}</a></span>
|
||||
<span> <a href={CONFIG.AUTHOR_LINK} className='p-1 hover:text-red-400 transition-all duration-200'><i className="fa-regular fa-user"></i> {siteConfig('AUTHOR')}</a></span>
|
||||
<span>
|
||||
<Link className='p-1 hover:text-red-400 transition-all duration-200' href={`/archive#${formatDateFmt(post?.publishDate, 'yyyy-MM')}`}>
|
||||
<i className="fa-regular fa-clock" /> {post.date?.start_date || post.createdTime}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import BLOG from '@/blog.config'
|
||||
import DarkModeButton from '@/components/DarkModeButton'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
|
||||
export const Footer = (props) => {
|
||||
const d = new Date()
|
||||
@@ -15,7 +16,7 @@ export const Footer = (props) => {
|
||||
<DarkModeButton className='text-center pt-4'/>
|
||||
|
||||
<div className="text-yellow-300 container mx-auto max-w-4xl py-6 md:flex flex-wrap md:flex-no-wrap md:justify-between items-center text-sm">
|
||||
<div className='text-center'> ©{`${copyrightDate}`} {BLOG.AUTHOR}. All rights reserved.</div>
|
||||
<div className='text-center'> ©{`${copyrightDate}`} {siteConfig('AUTHOR')}. All rights reserved.</div>
|
||||
<div className="md:p-0 text-center md:text-right text-xs">
|
||||
{/* 右侧链接 */}
|
||||
{/* <a href="#" className="text-black no-underline hover:underline">Privacy Policy</a> */}
|
||||
|
||||
@@ -3,7 +3,7 @@ import LazyImage from '@/components/LazyImage'
|
||||
import Link from 'next/link'
|
||||
import CONFIG from '../config'
|
||||
import SocialButton from './SocialButton'
|
||||
// import CONFIG from '../config_simple'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
|
||||
/**
|
||||
* 网站顶部
|
||||
@@ -20,11 +20,11 @@ export const Header = (props) => {
|
||||
{/* 可使用一张单图作为logo */}
|
||||
<div className='flex space-x-6'>
|
||||
<div className='hover:rotate-45 hover:scale-125 transform duration-200 cursor-pointer'>
|
||||
<LazyImage src={avatar} className='rounded-full' width={130} height={130} alt={BLOG.AUTHOR} />
|
||||
<LazyImage src={avatar} className='rounded-full' width={130} height={130} alt={siteConfig('AUTHOR')} />
|
||||
</div>
|
||||
|
||||
<div className='flex-col flex justify-center'>
|
||||
<div className='text-2xl font-serif dark:text-white py-2 hover:scale-105 transform duration-200'>{BLOG.AUTHOR}</div>
|
||||
<div className='text-2xl font-serif dark:text-white py-2 hover:scale-105 transform duration-200'>{siteConfig('AUTHOR')}</div>
|
||||
<div className='font-light dark:text-white py-2 hover:scale-105 transform duration-200 text-center' dangerouslySetInnerHTML={{ __html: CONFIG.LOGO_DESCRIPTION }} />
|
||||
</div>
|
||||
</div>
|
||||
@@ -33,7 +33,7 @@ export const Header = (props) => {
|
||||
<div className='flex justify-center'>
|
||||
<SocialButton />
|
||||
</div>
|
||||
<div className='text-xs mt-4 text-gray-500 dark:text-gray-300'>{siteInfo?.description}</div>
|
||||
<div className='text-xs mt-4 text-gray-500 dark:text-gray-300'>{siteConfig('HOME_BANNER_IMAGE')}</div>
|
||||
</div>
|
||||
</header>
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import BLOG from '@/blog.config'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
|
||||
/**
|
||||
* 标题栏
|
||||
@@ -6,9 +6,9 @@ import BLOG from '@/blog.config'
|
||||
* @returns
|
||||
*/
|
||||
export const Title = (props) => {
|
||||
const { siteInfo, post } = props
|
||||
const title = post?.title || siteInfo?.description
|
||||
const description = post?.description || BLOG.AUTHOR
|
||||
const { post } = props
|
||||
const title = post?.title || siteConfig('HOME_BANNER_IMAGE')
|
||||
const description = post?.description || siteConfig('AUTHOR')
|
||||
|
||||
return <div className="text-center px-6 py-12 mb-6 bg-gray-100 dark:bg-hexo-black-gray dark:border-hexo-black-gray border-b">
|
||||
<h1 className=" text-xl md:text-4xl pb-4">{title}</h1>
|
||||
|
||||
Reference in New Issue
Block a user