mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 18:36:21 +00:00
feat(global) compatibility milestone
This commit is contained in:
19 files changed
+347
-119
No files matched your search
@@ -3,25 +3,28 @@ import { Card, CardBody } from '@nextui-org/card';
|
||||
import Headers from '@/app/(pages)/blog/post/[id]/Headers';
|
||||
import Footer from '@/app/(pages)/blog/post/[id]/Footer';
|
||||
import MarkdownRenderer from '@/app/(pages)/public/MarkdownRenderer';
|
||||
import { FetchPostResponseData } from '@/src/api/blog/post';
|
||||
|
||||
type Props = {
|
||||
post: any
|
||||
post: FetchPostResponseData
|
||||
}
|
||||
|
||||
async function PostCard(props: Props) {
|
||||
let post = props.post;
|
||||
const post = props.post.post;
|
||||
const metadata: any | null = post.metadata;
|
||||
const adj = props.post.adjacent;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Card className={ `max-w-full relative` }>
|
||||
|
||||
{/* card headers */ }
|
||||
<Headers title={ post.title }
|
||||
subtitle={ post.sub_title }
|
||||
summary={ post.summary }
|
||||
subtitle={ post.subtitle }
|
||||
category={ post.category }
|
||||
tags={ post.tags }
|
||||
first_update={ post.first_update }
|
||||
header_img={ post.meta.header_img }
|
||||
first_update={ post.date_created }
|
||||
header_img={ metadata?.header_img }
|
||||
/>
|
||||
|
||||
{/* card body */ }
|
||||
@@ -36,14 +39,13 @@ async function PostCard(props: Props) {
|
||||
|
||||
{/* card footer */ }
|
||||
<Footer
|
||||
adjacent_posts={ post.adj }
|
||||
perm_link={ post.meta.link }
|
||||
author={ post.meta.author }
|
||||
author_link={ post.meta.author_link }
|
||||
first_update={ post.first_update }
|
||||
last_update={ post.last_update }
|
||||
cc={ post.meta.cc }
|
||||
post_id={ post.meta.id }
|
||||
adjacent_posts={ adj }
|
||||
perm_link={ metadata?.perm_link ?? `https://lumither.com/blog/post/${ post.id }` }
|
||||
author={ metadata?.author ?? 'Tao' }
|
||||
author_link={ metadata?.author_link ?? '/about/me' }
|
||||
first_update={ post.date_created }
|
||||
last_update={ post.date_updated }
|
||||
cc={ metadata?.cc }
|
||||
title={ post.title }
|
||||
/>
|
||||
|
||||
|
||||
Reference in new issue
Block a user