aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-04-12 11:50:37 +0200
committerlonkaars <l.leblansch@gmail.com>2021-04-12 11:50:37 +0200
commitffa1533a191bf09ea5934e8821de7d26275f8521 (patch)
treea3cbf697efae2a38b4a90c523cd4e2cba64555ce /components
parentf0e25c71e148758a76ee8d4807aa1262f25edc5d (diff)
added recent posts to home page
Diffstat (limited to 'components')
-rw-r--r--components/card.tsx11
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>
+}