1import Link from "next/link";
11export function Name({ children, className }) {
12 return <b className={`font-normal ${className || ""}`}>{children}</b>;
15export function Patp({ children, className }) {
17 <Link href={`/ids/${children}`} passHref>
19 <code className={`font-mono ${className || ""}`}>{children}</code>
25// Used to render a human name alongside their @p
26export function Person({
37 <Name className={nameClassNames}>{name}</Name>{" "}
38 <Patp className={patpClassNames + " opacity-60"}>{patp}</Patp>
41 <Patp className={patpClassNames}>{patp}</Patp>
43 <Name className={nameClassNames}>{name}</Name>
49// This goes inside a <p/> tag
50export function ReadableList({ children, serial = ",", conjunction = "and" }) {
53 {children.map((Child, index) => {
54 if (index < children.length - 2) {
61 } else if (index < children.length - 1) {
64 {Child} {conjunction}{" "}
74export function ShowOrHide({ children, condition }) {
81export function DateRange({ starts, ends, className, short }) {
82 // For events which have no end datetime
86 <p className={className}>
87 {`${formatDate(starts)} • ${formatTime(starts)} ${formatTimeZone(
94 // For events which start and end on the same day
95 if (starts.hasSame(ends, "day")) {
98 <p className={className}>
99 {`${formatDate(starts)} • ${formatTime(starts)} to ${formatTime(
101 )} ${formatTimeZone(starts)}`}
106 // For multi-day events
109 <p className={className}>{`${starts.toFormat(
111 )} to ${formatDate(ends)}`}</p>
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