diff options
Diffstat (limited to 'components')
-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> +} |