forked from vercel/turborepo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): improvements (vercel#1540)
## Docs Improvements This PR includes **No Functional Changes** - only the following improvements: * Remove dead code * Consolidates duplicated code / copy * Convert all of `docs/` to TS * Cleanup components * Cleanup dependencies
- Loading branch information
Showing
42 changed files
with
1,135 additions
and
2,277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Avatar } from "./Avatar"; | ||
import cn from "classnames"; | ||
import TURBO_TEAM from "../content/team"; | ||
import type { Author } from "../content/team"; | ||
|
||
export function Authors({ authors }: { authors: Array<Author> }) { | ||
return ( | ||
<div className="w-full border-b border-gray-400 authors border-opacity-20"> | ||
<div | ||
className={cn( | ||
"flex flex-wrap justify-center py-8 mx-auto gap-7", | ||
authors.length > 4 && "max-w-3xl" | ||
)} | ||
> | ||
{authors.map((username) => | ||
!!TURBO_TEAM[username] ? ( | ||
<Avatar key={username} {...TURBO_TEAM[username]} /> | ||
) : ( | ||
console.warn("no author found for: ", username) | ||
) | ||
)} | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { ReactNode } from "react"; | ||
import type { ReactNode } from "react"; | ||
|
||
type Props = { | ||
children?: ReactNode; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import type { Feature } from "../content/features"; | ||
|
||
type FeatureProps = { | ||
feature: Feature; | ||
// include feature description | ||
detailed?: boolean; | ||
}; | ||
|
||
export default function Feature(props: FeatureProps) { | ||
const { feature, detailed = false } = props; | ||
const { Icon, name, description } = feature; | ||
|
||
if (detailed) { | ||
return ( | ||
<div className="p-10 bg-white shadow-lg rounded-xl dark:bg-opacity-5 "> | ||
<div> | ||
<Icon | ||
className="h-8 w-8 dark:text-white rounded-full p-1.5 dark:bg-white dark:bg-opacity-10 bg-black bg-opacity-5 text-black" | ||
aria-hidden="true" | ||
/> | ||
</div> | ||
<div className="mt-4"> | ||
<h3 className="text-lg font-medium dark:text-white">{name}</h3> | ||
<p className="mt-2 text-base font-medium text-gray-500 dark:text-gray-400"> | ||
{description} | ||
</p> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
return ( | ||
<div className="flex items-center space-x-4"> | ||
<div> | ||
<Icon | ||
className="block w-8 h-8" | ||
style={{ height: 24, width: 24 }} | ||
aria-hidden="true" | ||
/> | ||
</div> | ||
<div> | ||
<div className="my-0 font-medium dark:text-white">{name}</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import Feature from "./Feature"; | ||
import { DOCS_FEATURES, HOME_FEATURES } from "../content/features"; | ||
import type { Feature as FeatureType } from "../content/features"; | ||
|
||
export default function Features({ | ||
page = "home", | ||
detailed = true, | ||
}: { | ||
page?: FeatureType["page"]; | ||
detailed?: boolean; | ||
}) { | ||
if (page === "docs") { | ||
return ( | ||
<div className="grid grid-cols-2 gap-6 my-12 sm:grid-cols-3 "> | ||
{DOCS_FEATURES.map((feature) => ( | ||
<Feature | ||
key={feature.name.split(" ").join("-")} | ||
feature={feature} | ||
detailed={detailed} | ||
/> | ||
))} | ||
</div> | ||
); | ||
} else { | ||
return ( | ||
<div className="grid grid-cols-1 mt-12 gap-x-6 gap-y-12 sm:grid-cols-2 lg:mt-16 lg:grid-cols-3 lg:gap-x-8 lg:gap-y-12"> | ||
{HOME_FEATURES.map((feature) => ( | ||
<Feature | ||
key={feature.name.split(" ").join("-")} | ||
feature={feature} | ||
detailed | ||
/> | ||
))} | ||
</div> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Oops, something went wrong.