diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-04-12 11:50:37 +0200 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-04-12 11:50:37 +0200 |
commit | ffa1533a191bf09ea5934e8821de7d26275f8521 (patch) | |
tree | a3cbf697efae2a38b4a90c523cd4e2cba64555ce /components/card.tsx | |
parent | f0e25c71e148758a76ee8d4807aa1262f25edc5d (diff) |
added recent posts to home page
Diffstat (limited to 'components/card.tsx')
-rw-r--r-- | components/card.tsx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/components/card.tsx b/components/card.tsx new file mode 100644 index 0000000..ba62d57 --- /dev/null +++ b/components/card.tsx @@ -0,0 +1,11 @@ +import { ArticleMeta } from '../pages/post/[id]'; + +export default function PostCard(props: { + post: ArticleMeta +}) { + return <a className="postCard" href={"/post/" + props.post.id}> + { props.post.cover && <img src={props.post.cover} className="cover"/> } + <h2 className="title">{props.post.title}</h2> + <strong className="subtitle">{props.post.subtitle}</strong> + </a> +} |