diff --git a/app/blog/BlogPostCard.tsx b/app/blog/BlogPostCard.tsx index 2e1a1b4..6c18dd8 100644 --- a/app/blog/BlogPostCard.tsx +++ b/app/blog/BlogPostCard.tsx @@ -1,7 +1,8 @@ import React from 'react'; -import { Card, CardBody, CardHeader } from '@nextui-org/card'; -import { Divider } from '@nextui-org/react'; +import { Card, CardBody, CardFooter } from '@nextui-org/card'; +import { Chip, Image } from '@nextui-org/react'; import Link from 'next/link'; +import { MdCalendarMonth, MdNorthEast } from 'react-icons/md'; type Props = { post: JSON @@ -9,25 +10,72 @@ type Props = { function BlogPostCard({ post }: Props) { let title = (post as any)['title']; - let summary = (post as any)['summary']; - let last_update = (post as any)['last_update']; + let sub_title = (post as any)['sub_title']; + // let summary = (post as any)['summary']; + let category = (post as any)['category']; + let tags = (post as any)['tags']; + // let last_update = new Date((post as any)['last_update']); + let first_update = new Date((post as any)['first_update']); let post_id = (post as any)['post_id']; + let pic_url = (post as any)['pic_url']; return (
- - -

{ title }

-
- + + { pic_url !== '' &&
+ { +
} + - { summary } - - - - { last_update } +
+
+ { category } +

{ title }

+

{ sub_title }

+
+ +
+ +
+
+
    + { + tags.map((tag: string, key: any) => ( +
  • + { tag } +
  • + )) + } +
+
+
+ +

+ { first_update.toLocaleString('default', { + month: `long`, + day: `numeric`, + year: `numeric` + }) } +

+
+
+
);