1import Link from "next/link";
2import BackgroundImage from "./BackgroundImage";
3import { formatDate } from "../lib/lib";
5export default function PostPreview(props) {
6 const section = props?.section ? props.section : "blog";
8 <div className={`cursor-pointer ${props.className}`}>
9 {props.title ? <h3 className="mb-2">{props.title}</h3> : null}
12 href={`/${section}/${props.post.slug}`}
13 key={`post-${props.post.slug}`}
17 className="w-full h-96 rounded-lg"
18 src={props.post.extra.image || ""}
20 <p className="text-black mt-2">{props.post.title}</p>
21 <p className="text-gray">{formatDate(new Date(props.post.date))}</p>
28PostPreview.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