From 29eb26b37b5fe9bb1aad721c189394b738943c64 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Thu, 9 Mar 2023 14:35:40 +0800 Subject: [PATCH] theme-simple article --- themes/simple/components/ArticleInfo.js | 36 ++++++++++++++----------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/themes/simple/components/ArticleInfo.js b/themes/simple/components/ArticleInfo.js index 0b34fb12..5a52750c 100644 --- a/themes/simple/components/ArticleInfo.js +++ b/themes/simple/components/ArticleInfo.js @@ -1,6 +1,8 @@ import Link from 'next/link' import { useGlobal } from '@/lib/global' import formatDate from '@/lib/formatDate' +import CONFIG_SIMPLE from '../config_simple' +import BLOG from '@/blog.config' export const ArticleInfo = (props) => { const { post } = props @@ -9,20 +11,22 @@ export const ArticleInfo = (props) => { const date = formatDate(post?.date?.start_date || post?.createdTime, locale.LOCALE) return ( -
+
- {post?.type !== 'Page' && <> - +

+ {post.title} +

- - {post.category} - - - | - } + {post?.type !== 'Page' && (<> +
+ {BLOG.AUTHOR} + - {post.date?.start_date || post.createdTime} + {post.category && - {post.category}} + {post.tags && post.tags?.length > 0 && post.tags.map(t => / {t})} +
+ )} {post?.type !== 'Page' && (<> { | - -   - - + +   + + )}