所有主题支持 title icon

This commit is contained in:
tangly1024.com
2024-02-05 17:54:51 +08:00
parent abb5705697
commit a45320d1af
18 changed files with 126 additions and 96 deletions

View File

@@ -5,6 +5,7 @@ import { formatDateFmt } from '@/lib/formatDate'
import { siteConfig } from '@/lib/config'
import LazyImage from '@/components/LazyImage'
import { checkContainHttp, sliceUrlFromHttp } from '@/lib/utils'
import NotionIcon from '@/components/NotionIcon'
export const BlogItem = props => {
const { post } = props
@@ -26,18 +27,18 @@ export const BlogItem = props => {
)}
</div>
<div className='article-info'>
<article className='article-info'>
<h2 className="mb-2">
<Link
href={url}
className="blog-item-title font-bold text-black text-2xl menu-link">
{post.title}
<NotionIcon icon={post.pageIcon} />{post.title}
</Link>
</h2>
{/* 文章信息 */}
<div className="mb-5 text-md text-gray-700 dark:text-gray-300 flex-wrap flex leading-6">
<header 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={siteConfig('SIMPLE_AUTHOR_LINK', null, CONFIG)} className='p-1 hover:text-red-400 transition-all duration-200'><i className="fa-regular fa-user"></i> {siteConfig('AUTHOR')}</a></span>
<span>
@@ -52,13 +53,13 @@ export const BlogItem = props => {
{post.category && <Link href={`/category/${post.category}`} className='p-1'> <span className="hover:text-red-400 transition-all duration-200"><i className="fa-regular fa-folder mr-0.5" />{post.category}</span></Link>}
{post?.tags && post?.tags?.length > 0 && post?.tags.map(t => <Link key={t} href={`/tag/${t}`} className=' hover:text-red-400 transition-all duration-200'><span > /{t}</span></Link>)}
</div>
</div>
</header>
<div className="text-gray-700 dark:text-gray-300 leading-normal mb-6">
<main className="text-gray-700 dark:text-gray-300 leading-normal mb-6">
{post.summary}
{post.summary && <span>...</span>}
</div>
</div>
</main>
</article>
</div>
<div className='block'>