The first commit, the core and all files is adding to repo

This commit is contained in:
2026-10-04 14:20:13 +05:00
commit 53d7b263c4
94 changed files with 10668 additions and 0 deletions

54
app/servers/[id]/page.tsx Normal file
View File

@@ -0,0 +1,54 @@
import { notFound } from "next/navigation";
import Image from "next/image";
import { Header, Footer } from "@/components/Shell";
import { StartGame } from "@/components/StartGame";
import { getMap } from "@/lib/catalog";
export default async function ServerPage({
params,
}: {
params: Promise<{ id: string }>;
}) {
const { id } = await params;
let map;
try {
map = await getMap(id);
} catch {
notFound();
}
return (
<>
<Header />
<main className="section page-content">
<span className="eyebrow">
{map.source === "plugin" ? "SERVER EXPORT" : "PLAYER CONTRIBUTION"} ·
MINECRAFT 1.21.11
</span>
<h1>{map.name}</h1>
<p className="lead">{map.description}</p>
<div className="detail-grid">
<div>
<div className="detail-map">
<Image
src={map.mapImage || map.image || ""}
alt={`${map.name} surface map`}
width={1024}
height={1024}
unoptimized
/>
</div>
<div className="card-meta">
<span>{map.panorama_count} panoramas</span>
<span>Overworld surface</span>
<span>
{map.bounds.maxX - map.bounds.minX} ×{" "}
{map.bounds.maxZ - map.bounds.minZ} blocks
</span>
</div>
</div>
<StartGame datasetId={id} />
</div>
</main>
<Footer />
</>
);
}

28
app/servers/page.tsx Normal file
View File

@@ -0,0 +1,28 @@
import { Header, Footer, EmptyState } from "@/components/Shell";
import { catalog } from "@/lib/catalog";
import { CatalogBrowser } from "@/components/CatalogBrowser";
export const dynamic = "force-dynamic";
export default async function Servers() {
const maps = await catalog();
return (
<>
<Header />
<main className="section page-content">
<span className="eyebrow">THE COMMUNITY AT YOUR COORDINATES</span>
<h1>Explore the worlds.</h1>
<p className="lead">
From familiar spawn towns to places nobody’s quite sure about. Pick
your next expedition.
</p>
{maps.length ? (
<CatalogBrowser maps={maps} />
) : (
<EmptyState title="Fresh chunks, fresh start">
No maps have been approved yet. Your server could be the first.
</EmptyState>
)}
</main>
<Footer />
</>
);
}