mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
Merge pull request #1327 from tangly1024/fix/medium-article-info
medium 主题文章详情页
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import BLOG from '@/blog.config'
|
||||
import LazyImage from '@/components/LazyImage'
|
||||
import formatDate from '@/lib/formatDate'
|
||||
import Link from 'next/link'
|
||||
|
||||
/**
|
||||
@@ -11,8 +10,6 @@ import Link from 'next/link'
|
||||
export default function ArticleInfo(props) {
|
||||
const { post, siteInfo } = props
|
||||
|
||||
const date = formatDate(post?.publishTime || post?.createdTime)
|
||||
|
||||
return (<>
|
||||
{/* title */}
|
||||
<h1 className="text-3xl pt-12 dark:text-gray-300">{post?.title}</h1>
|
||||
@@ -20,9 +17,9 @@ export default function ArticleInfo(props) {
|
||||
{/* meta */}
|
||||
<section className="py-2 items-center text-sm px-1">
|
||||
<div className='flex flex-wrap text-gray-500 py-1 dark:text-gray-600'>
|
||||
<span className='whitespace-nowrap'> <i className='far fa-calendar mr-2' />{date}</span>
|
||||
<span className='whitespace-nowrap'> <i className='far fa-calendar mr-2' />{post?.publishTime}</span>
|
||||
<span className='mx-1'>|</span>
|
||||
<span className='whitespace-nowrap mr-2'><i className='far fa-calendar-check mr-2' />{post.lastEditedTime}</span>
|
||||
<span className='whitespace-nowrap mr-2'><i className='far fa-calendar-check mr-2' />{post?.lastEditedTime}</span>
|
||||
<div className="hidden busuanzi_container_page_pv font-light mr-2 whitespace-nowrap">
|
||||
<i className="mr-1 fas fa-eye" /><span className="busuanzi_value_page_pv" />
|
||||
</div>
|
||||
|
||||
@@ -35,6 +35,7 @@ import Link from 'next/link'
|
||||
import { Transition } from '@headlessui/react'
|
||||
import { Style } from './style'
|
||||
import replaceSearchResult from '@/components/Mark'
|
||||
import ArticleInfo from './components/ArticleInfo'
|
||||
|
||||
// 主题全局状态
|
||||
const ThemeGlobalMedium = createContext()
|
||||
@@ -161,6 +162,9 @@ const LayoutSlug = props => {
|
||||
|
||||
{!lock && <div id='article-wrapper'>
|
||||
|
||||
{/* 文章信息 */}
|
||||
<ArticleInfo {...props}/>
|
||||
|
||||
{/* Notion文章主体 */}
|
||||
<section className="px-1 max-w-4xl">
|
||||
{post && (<NotionPage post={post} />)}
|
||||
|
||||
Reference in New Issue
Block a user