Page 隐藏博文组件

This commit is contained in:
tangly
2022-11-05 16:02:54 +08:00
parent 671eaa6840
commit 3ea52edccd
4 changed files with 25 additions and 22 deletions

View File

@@ -92,7 +92,7 @@ export default function ArticleDetail(props) {
</article> </article>
<ArticleAround prev={prev} next={next} /> {post.type === 'Post' && <ArticleAround prev={prev} next={next} /> }
{/* 评论互动 */} {/* 评论互动 */}
<div className="duration-200 shadow px-12 w-screen md:w-full overflow-x-auto dark:border-gray-700 bg-white dark:bg-hexo-black-gray"> <div className="duration-200 shadow px-12 w-screen md:w-full overflow-x-auto dark:border-gray-700 bg-white dark:bg-hexo-black-gray">

View File

@@ -74,9 +74,10 @@ export const LayoutSlug = props => {
data-ad-slot="3806269138" /> data-ad-slot="3806269138" />
</section> </section>
<ArticleCopyright {...props} /> {post.type === 'Post' && <ArticleCopyright {...props} /> }
<ArticleRecommend {...props} /> {post.type === 'Post' && <ArticleRecommend {...props} /> }
<ArticleAdjacent {...props} /> {post.type === 'Post' && <ArticleAdjacent {...props} /> }
</article> </article>
<hr className='border-dashed' /> <hr className='border-dashed' />

View File

@@ -66,7 +66,7 @@ export const ArticleDetail = props => {
{CONFIG_MEDIUM.POST_DETAIL_TAG && post?.tagItems?.map(tag => <TagItemMini key={tag.name} tag={tag} />)} {CONFIG_MEDIUM.POST_DETAIL_TAG && post?.tagItems?.map(tag => <TagItemMini key={tag.name} tag={tag} />)}
</div> </div>
</div> </div>
<ArticleAround prev={prev} next={next} /> {post.type === 'Post' && <ArticleAround prev={prev} next={next} /> }
<Comment frontMatter={post} /> <Comment frontMatter={post} />
</section> </section>
</div> </div>

View File

@@ -100,29 +100,31 @@ export default function ArticleDetail(props) {
{showArticleInfo && <> {showArticleInfo && <>
{/* 版权声明 */} {/* 版权声明 */}
<ArticleCopyright author={BLOG.AUTHOR} url={url} /> {post.type === 'Post' && <ArticleCopyright author={BLOG.AUTHOR} url={url} /> }
{/* 推荐文章 */} {/* 推荐文章 */}
<RecommendPosts currentPost={post} recommendPosts={recommendPosts} /> {post.type === 'Post' && <RecommendPosts currentPost={post} recommendPosts={recommendPosts} />}
{/* 标签列表 */} {/* 标签列表 */}
<section className="md:flex md:justify-between"> {post.type === 'Post' && (
{post.tagItems && ( <section className="md:flex md:justify-between">
<div className="flex flex-nowrap leading-8 p-1 py-4 overflow-x-auto"> {post.tagItems && (
<div className="hidden md:block dark:text-gray-300 whitespace-nowrap"> <div className="flex flex-nowrap leading-8 p-1 py-4 overflow-x-auto">
{locale.COMMON.TAGS} <div className="hidden md:block dark:text-gray-300 whitespace-nowrap">
</div> {locale.COMMON.TAGS}
{post.tagItems.map(tag => ( </div>
<TagItem key={tag.name} tag={tag} /> {post.tagItems.map(tag => (
))} <TagItem key={tag.name} tag={tag} />
))}
</div>
)}
<div>
<ShareBar post={post} />
</div> </div>
)} </section>
<div> )}
<ShareBar post={post} />
</div>
</section>
<BlogAround prev={prev} next={next} /> {post.type === 'Post' && <BlogAround prev={prev} next={next} /> }
</>} </>}
{/* 评论互动 */} {/* 评论互动 */}