-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a090713
commit 92fbac4
Showing
36 changed files
with
802 additions
and
710 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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import type { FrontMatter, Page } from "nextra"; | ||
import { getPagesUnderRoute } from "nextra/context"; | ||
import Link from "next/link"; | ||
|
||
export default function BlogIndex({ more = "Read more" }: { more?: string }) { | ||
return getPagesUnderRoute("/blog").map( | ||
(page: Page & { frontMatter?: FrontMatter }) => { | ||
return ( | ||
<div key={page.route} className="mb-10"> | ||
<h3> | ||
<Link | ||
href={page.route} | ||
style={{ color: "inherit", textDecoration: "none" }} | ||
className="block font-semibold mt-8 text-2xl " | ||
> | ||
{page.meta?.title || page.frontMatter?.title || page.name} | ||
</Link> | ||
</h3> | ||
<p className="opacity-80 mt-6 leading-7"> | ||
{page.frontMatter?.description}{" "} | ||
<span className="inline-block"> | ||
<Link | ||
href={page.route} | ||
className="text-[color:hsl(var(--nextra-primary-hue),100%,50%)] underline underline-offset-2 decoration-from-font" | ||
> | ||
{more + " →"} | ||
</Link> | ||
</span> | ||
</p> | ||
{page.frontMatter?.date ? ( | ||
<p className="opacity-50 text-sm mt-6 leading-7"> | ||
{page.frontMatter.date} | ||
</p> | ||
) : null} | ||
</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
8 changes: 6 additions & 2 deletions
8
components/diagrams/infinite.js → components/diagrams/infinite.tsx
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
8 changes: 6 additions & 2 deletions
8
components/diagrams/pagination.js → components/diagrams/pagination.tsx
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
8 changes: 6 additions & 2 deletions
8
components/diagrams/welcome.js → components/diagrams/welcome.tsx
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.
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,52 @@ | ||
import { useId } from "react"; | ||
import useLocalesMap from "./use-locales-map"; | ||
import { type FeatureKey, featuresMap, titleMap } from "../translations/text"; | ||
|
||
import BackendAgnosticIcon from "./icons/backend-agnostic"; | ||
import LightweightIcon from "./icons/lightweight"; | ||
import PaginationIcon from "./icons/pagination"; | ||
import RealtimeIcon from "./icons/realtime"; | ||
import RemoteLocalIcon from "./icons/remote-local"; | ||
import RenderingStrategiesIcon from "./icons/rendering-strategies"; | ||
import SuspenseIcon from "./icons/suspense"; | ||
import TypeScriptIcon from "./icons/typescript"; | ||
|
||
type Icon = React.FC<React.SVGProps<SVGSVGElement>>; | ||
|
||
const FEATURE_ICONS = { | ||
lightweight: LightweightIcon, | ||
realtime: RealtimeIcon, | ||
suspense: SuspenseIcon, | ||
pagination: PaginationIcon, | ||
backendAgnostic: BackendAgnosticIcon, | ||
renderingStrategies: RenderingStrategiesIcon, | ||
typescript: TypeScriptIcon, | ||
remoteLocal: RemoteLocalIcon, | ||
} satisfies Record<FeatureKey, Icon>; | ||
|
||
export default function Features() { | ||
const componentId = useId(); | ||
const title = useLocalesMap(titleMap); | ||
const features = useLocalesMap(featuresMap); | ||
|
||
return ( | ||
<div className="mx-auto max-w-full w-[880px] text-center px-4 mb-10"> | ||
<p className="text-lg mb-2 text-gray-600 md:!text-2xl">{title}</p> | ||
<div className="grid grid-cols-2 gap-y-4 gap-x-2 mt-10 mx-0 mb-8 sm:grid-cols-4 md:gap-x-8"> | ||
{Object.entries(FEATURE_ICONS).map( | ||
([key, FeatureIcon]: [FeatureKey, Icon]) => ( | ||
<div | ||
className="inline-flex justify-center items-center md:justify-start pl-0" | ||
key={componentId + key} | ||
> | ||
<FeatureIcon className="w-5 h-6 min-w-[20px] stroke-[2.5px] md:w-6" /> | ||
<h4 className="text-sm my-0 mr-0 ml-2 font-bold whitespace-nowrap sm:text-[0.9rem] md:text-lg"> | ||
{features[key]} | ||
</h4> | ||
</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
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 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
Oops, something went wrong.