获取外部Notion页面

This commit is contained in:
tangly
2022-11-16 22:21:57 +08:00
parent 12babbdbca
commit 1e56ced00d
8 changed files with 59 additions and 17 deletions

View File

@@ -10,7 +10,7 @@ export const ArticleInfo = (props) => {
return <section className="flex-wrap flex mt-2 text-gray-400 dark:text-gray-400 font-light leading-8">
<div>
{post?.type[0] !== 'Page' && <>
{post?.type !== 'Page' && <>
<Link href={`/category/${post.category}`} passHref>
<a className="cursor-pointer text-md mr-2 hover:text-black dark:hover:text-white border-b dark:border-gray-500 border-dashed">
<i className="mr-1 fas fa-folder-open" />
@@ -20,7 +20,7 @@ export const ArticleInfo = (props) => {
<span className='mr-2'>|</span>
</>}
{post?.type[0] !== 'Page' && (<>
{post?.type !== 'Page' && (<>
<Link
href={`/archive#${post?.date?.start_date?.substr(0, 7)}`}
passHref

View File

@@ -48,7 +48,7 @@ export default function ArticleDetail(props) {
<span className='mr-2'>|</span>
</>)}
{post?.type[0] !== 'Page' && (<>
{post?.type !== 'Page' && (<>
<Link
href={`/archive#${post?.date?.start_date?.substr(0, 7)}`}
passHref

View File

@@ -40,7 +40,7 @@ export default function HeaderArticle({ post, siteInfo }) {
</>}
</div>
<div className='flex justify-center'>
{post?.type[0] !== 'Page' && (
{post?.type !== 'Page' && (
<>
<Link
href={`/archive#${post?.date?.start_date?.substr(0, 7)}`}

View File

@@ -29,7 +29,7 @@ export default function ArticleDetail(props) {
>
{showArticleInfo && <header className='animate__slideInDown animate__animated'>
{post?.type && !post?.type.includes('Page') && post?.page_cover && (
{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' />
@@ -51,7 +51,7 @@ export default function ArticleDetail(props) {
</Link>
<span className='mr-2'>|</span>
</>}
{post?.type[0] !== 'Page' && (<>
{post?.type !== 'Page' && (<>
<Link
href={`/archive#${post?.date?.start_date?.substr(0, 7)}`}
passHref