change docs and docs page
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m30s
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m30s
This commit is contained in:
parent
782b5efd4b
commit
9e17145e90
@ -1,9 +1,9 @@
|
||||
---
|
||||
title: Mojang - Endpoint Status
|
||||
title: Mojang Endpoint Status
|
||||
summary: Get the status of the Mojang APIs.
|
||||
---
|
||||
|
||||
# Mojang - Endpoint Status
|
||||
# Overview
|
||||
|
||||
The Mojang endpoint status endpoint allows you to get the status of the Mojang APIs.
|
||||
|
||||
|
@ -3,7 +3,7 @@ title: Player Lookup
|
||||
summary: Get information about a player.
|
||||
---
|
||||
|
||||
# Player Lookup
|
||||
# Overview
|
||||
|
||||
The player lookup endpoint allows you to get information about a player. This includes their UUID, username, and any other information that is available.
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
---
|
||||
title: Player - Skin Parts
|
||||
title: Player Skin Parts
|
||||
summary: Get a specific part of a player's skin.
|
||||
---
|
||||
|
||||
# Player - Skin Parts
|
||||
# Overview
|
||||
|
||||
The player skin parts endpoint allows you to get a specific part of a player's skin.
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
---
|
||||
title: Player - Username to UUID
|
||||
title: Player Username to UUID
|
||||
summary: Get a player's UUID from their username.
|
||||
---
|
||||
|
||||
# Player - Username to UUID
|
||||
# Overview
|
||||
|
||||
The player username to UUID endpoint allows you to get a player's UUID from their username.
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
---
|
||||
title: Server - Blocked Status
|
||||
title: Server Blocked Status
|
||||
summary: Get the Mojang blocked status of a Minecraft server.
|
||||
---
|
||||
|
||||
# Server - Blocked Status
|
||||
# Overview
|
||||
|
||||
The server blocked status endpoint allows you to get the Mojang blocked status of a Minecraft server.
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
---
|
||||
title: Server - Favicon
|
||||
title: Server Favicon
|
||||
summary: Get the favicon of a Minecraft server.
|
||||
---
|
||||
|
||||
# Server - Favicon
|
||||
# Overview
|
||||
|
||||
The server favicon endpoint allows you to get the favicon of a Minecraft server.
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
---
|
||||
title: Server - Preview
|
||||
title: Server Preview
|
||||
summary: Get the server list preview of a Minecraft server.
|
||||
---
|
||||
|
||||
# Server - Preview
|
||||
# Overview
|
||||
|
||||
The server preview endpoint allows you to get the server list preview of a Minecraft server.
|
||||
|
||||
|
@ -3,7 +3,7 @@ title: Server Lookup
|
||||
summary: Get information about a server.
|
||||
---
|
||||
|
||||
# Server Lookup
|
||||
# Overview
|
||||
|
||||
The server lookup endpoint allows you to get information about a server. This includes the server's IP address, port, and any other information that is available.
|
||||
|
||||
|
@ -3,16 +3,9 @@ import { Metadata } from "next";
|
||||
import { generateEmbed } from "@/app/common/embed";
|
||||
import { Title } from "@/app/components/title";
|
||||
import { DocsContentMetadata, getDocContent, getDocsContent } from "@/app/common/documentation";
|
||||
import {
|
||||
Breadcrumb,
|
||||
BreadcrumbItem,
|
||||
BreadcrumbLink,
|
||||
BreadcrumbList,
|
||||
BreadcrumbSeparator,
|
||||
} from "@/app/components/ui/breadcrumb";
|
||||
import { capitalizeFirstLetter } from "@/app/common/string-utils";
|
||||
import { notFound } from "next/navigation";
|
||||
import { GithubLink } from "@/app/components/docs/github-link";
|
||||
import { DocsBreadcrumb } from "@/app/components/docs/breadcrumb";
|
||||
|
||||
type DocumentationPageParams = {
|
||||
params: {
|
||||
@ -56,36 +49,11 @@ export default function Page({ params: { slug } }: DocumentationPageParams) {
|
||||
return notFound();
|
||||
}
|
||||
|
||||
const slugParts: string[] = page.slug.split("/");
|
||||
const isHome: boolean = slugParts.length == 1;
|
||||
|
||||
return (
|
||||
<div className="w-full h-full px-4 flex flex-col gap-2">
|
||||
<div className="flex justify-between items-center">
|
||||
{/* The breadcrumb for the documentation page */}
|
||||
<Breadcrumb>
|
||||
<BreadcrumbList>
|
||||
<BreadcrumbItem>
|
||||
<BreadcrumbLink href={`/docs`}>Home</BreadcrumbLink>
|
||||
</BreadcrumbItem>
|
||||
{!isHome &&
|
||||
slugParts.map((slug, index, array) => {
|
||||
const path: string = array.slice(0, index + 1).join("/");
|
||||
const name: string = slug.includes("-")
|
||||
? slug.split("-").map(capitalizeFirstLetter).join(" ")
|
||||
: capitalizeFirstLetter(slug);
|
||||
|
||||
return (
|
||||
<div key={slug} className="flex items-center ">
|
||||
<BreadcrumbSeparator className="pr-1.5" />
|
||||
<BreadcrumbItem>
|
||||
<BreadcrumbLink href={`/docs/${path}`}>{capitalizeFirstLetter(name)}</BreadcrumbLink>
|
||||
</BreadcrumbItem>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</BreadcrumbList>
|
||||
</Breadcrumb>
|
||||
<DocsBreadcrumb page={page} />
|
||||
|
||||
{/* The Git link for the documentation page */}
|
||||
<div className="flex flex-row gap-2 items-center">
|
||||
|
48
src/app/components/docs/breadcrumb.tsx
Normal file
48
src/app/components/docs/breadcrumb.tsx
Normal file
@ -0,0 +1,48 @@
|
||||
import { ReactElement } from "react";
|
||||
import {
|
||||
Breadcrumb,
|
||||
BreadcrumbItem,
|
||||
BreadcrumbLink,
|
||||
BreadcrumbList,
|
||||
BreadcrumbSeparator,
|
||||
} from "@/app/components/ui/breadcrumb";
|
||||
import { capitalizeFirstLetter } from "@/app/common/string-utils";
|
||||
import { DocsContentMetadata } from "@/app/common/documentation";
|
||||
|
||||
type DocsBreadcrumbProps = {
|
||||
/**
|
||||
* The page to render the breadcrumb for.
|
||||
*/
|
||||
page: DocsContentMetadata;
|
||||
};
|
||||
|
||||
export function DocsBreadcrumb({ page }: DocsBreadcrumbProps): ReactElement {
|
||||
const slugParts: string[] = page.slug.split("/");
|
||||
const isHome: boolean = slugParts.length == 1;
|
||||
|
||||
return (
|
||||
<Breadcrumb>
|
||||
<BreadcrumbList>
|
||||
<BreadcrumbItem>
|
||||
<BreadcrumbLink href={`/docs`}>Home</BreadcrumbLink>
|
||||
</BreadcrumbItem>
|
||||
{!isHome &&
|
||||
slugParts.map((slug, index, array) => {
|
||||
const path: string = array.slice(0, index + 1).join("/");
|
||||
const name: string = slug.includes("-")
|
||||
? slug.split("-").map(capitalizeFirstLetter).join(" ")
|
||||
: capitalizeFirstLetter(slug);
|
||||
|
||||
return (
|
||||
<div key={slug} className="flex items-center ">
|
||||
<BreadcrumbSeparator className="pr-1.5" />
|
||||
<BreadcrumbItem>
|
||||
<BreadcrumbLink href={`/docs/${path}`}>{capitalizeFirstLetter(name)}</BreadcrumbLink>
|
||||
</BreadcrumbItem>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</BreadcrumbList>
|
||||
</Breadcrumb>
|
||||
);
|
||||
}
|
@ -38,7 +38,7 @@ const DialogContent = React.forwardRef<
|
||||
<DialogPrimitive.Content
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-md md:max-w-2xl xl:max-w-6xl translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
||||
"fixed left-[50%] top-[50%] z-50 grid max-w-md md:max-w-2xl xl:max-w-6xl translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
|
@ -3,7 +3,6 @@
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
import Error from "next/error";
|
||||
import { useEffect } from "react";
|
||||
import Link from "next/link";
|
||||
import { Button } from "@/app/components/ui/button";
|
||||
|
||||
export default function GlobalError({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) {
|
||||
|
Loading…
Reference in New Issue
Block a user