mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-08 07:26:47 +00:00
Next主题可隐藏头图,并显示icon
This commit is contained in:
@@ -11,6 +11,8 @@ import { useRouter } from 'next/router'
|
||||
import ArticleCopyright from './ArticleCopyright'
|
||||
import WordCount from './WordCount'
|
||||
import NotionPage from '@/components/NotionPage'
|
||||
import CONFIG_NEXT from '../config_next'
|
||||
import NotionIcon from '@/components/NotionIcon'
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -29,7 +31,7 @@ export default function ArticleDetail(props) {
|
||||
>
|
||||
|
||||
{showArticleInfo && <header className='animate__slideInDown animate__animated'>
|
||||
{post?.type && !post?.type.includes('Page') && post?.page_cover && (
|
||||
{CONFIG_NEXT.POST_HEADER_IMAGE_VISIBLE && post?.type && !post?.type !== 'Page' && post?.page_cover && (
|
||||
<div className="w-full relative md:flex-shrink-0 overflow-hidden">
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img alt={post.title} src={post?.page_cover} className='object-center w-full' />
|
||||
@@ -38,7 +40,7 @@ export default function ArticleDetail(props) {
|
||||
|
||||
{/* 文章Title */}
|
||||
<div className="font-bold text-3xl text-black dark:text-white font-serif pt-10">
|
||||
{post.title}
|
||||
<NotionIcon icon={post.pageIcon}/>{post.title}
|
||||
</div>
|
||||
|
||||
<section className="flex-wrap flex mt-2 text-gray-400 dark:text-gray-400 font-light leading-8">
|
||||
|
||||
@@ -7,6 +7,7 @@ import Card from './Card'
|
||||
import TagItemMini from './TagItemMini'
|
||||
import CONFIG_NEXT from '../config_next'
|
||||
import NotionPage from '@/components/NotionPage'
|
||||
import NotionIcon from '@/components/NotionIcon'
|
||||
|
||||
const BlogPostCard = ({ post, showSummary }) => {
|
||||
const { locale } = useGlobal()
|
||||
@@ -23,7 +24,7 @@ const BlogPostCard = ({ post, showSummary }) => {
|
||||
className={`cursor-pointer hover:underline text-3xl ${showPreview ? 'text-center' : ''
|
||||
} leading-tight text-gray-700 dark:text-gray-100 hover:text-blue-500 dark:hover:text-blue-400`}
|
||||
>
|
||||
{post.title}
|
||||
<NotionIcon icon={post.pageIcon} /> {post.title}
|
||||
</a>
|
||||
</Link>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user