1import Section from "./Section";
2import { useState, useEffect } from "react";
3import { TableOfContents } from "./TableOfContents";
5export default function ContentArea(props) {
6 const [shortcut, setShortcut] = useState("");
8 const detectOS = () => {
9 const agent = window.navigator.appVersion;
10 if (agent.includes("Win")) {
12 } else if (agent.includes("Mac")) {
14 } else if (agent.includes("Linux")) {
20 setShortcut(detectOS());
24 <div className="w-full min-w-0 flex flex-col items-center">
25 <div className="px-4 md:px-12 lg:px-24 pb-24 pt-8 md:pt-10 lg:pt-16 flex flex-col w-full max-w-screen-xl max-h-screen h-screen overflow-y-scroll">
26 <div className="flex justify-between w-full items-center flex-shrink-0">
27 <div className="type-ui text-gray">{props.breadcrumbs}</div>
28 <div className="hidden md:block">
32 props.search.toggleSearch();
34 className="bg-wall text-gray flex px-4 py-1 rounded-lg type-ui"
36 Search<div className="ml-4 text-lightGray">{shortcut}</div>
40 <div className="w-full flex justify-center">
42 <Section narrow className={""}>
43 <h2 className="mb-16 mt-24">{props.title}</h2>
45 <div className="pb-32" />
48 <div className="min-w-0">
49 <h2 className="mb-16 mt-24">{props.title}</h2>
51 <div className="pb-32" />
55 key={props.params.slug?.join("/") || Math.random()}
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