aboutsummaryrefslogtreecommitdiff
path: root/components/card.tsx
blob: 7a6a472eb920e8c4edb975c4767f637765ff8998 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import Tags from './tag';

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>
		{props.post.tags?.length != 0 && <Tags tags={props.post.tags} />}
	</a>;
}