1import Link from "next/link";
2import BackgroundImage from "./BackgroundImage";
3import { formatDate } from "../lib/lib";
5export default function PostPreview(props) {
7 <div className={`cursor-pointer ${props.className}`}>
8 {props.title ? <h3 className="mb-2">{props.title}</h3> : null}
10 <Link href={`/blog/${props.post.slug}`} key={`post-${props.post.slug}`}>
13 className="w-full h-80 rounded-lg"
14 src={props.post.extra.image || ""}
16 <p className="text-black mt-2">{props.post.title}</p>
17 <p className="text-gray">{formatDate(new Date(props.post.date))}</p>
24PostPreview.defaultProps = {
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list