feat: update layout and page content for Takasumi-Neody Minecraft server project

This commit is contained in:
2026-03-29 04:54:28 +00:00
parent 1382cb7768
commit 27b3e6ffd1
5 changed files with 279 additions and 59 deletions

View File

@@ -16,8 +16,8 @@ const geistMono = Geist_Mono({
}); });
export const metadata: Metadata = { export const metadata: Metadata = {
title: "Create Next App", title: "Takasumi-Neodyマイクラサーバプロジェクト接続ガイド",
description: "Generated by create next app", description: "Takasumi-Neodyマイクラサーバプロジェクトサバイバル鯖・建築鯖への接続方法とサーバアドレスを案内します。",
}; };
export default function RootLayout({ export default function RootLayout({
@@ -27,7 +27,7 @@ export default function RootLayout({
}>) { }>) {
return ( return (
<html <html
lang="en" lang="ja"
className={cn("h-full", "antialiased", geistSans.variable, geistMono.variable, "font-sans", inter.variable)} className={cn("h-full", "antialiased", geistSans.variable, geistMono.variable, "font-sans", inter.variable)}
> >
<body className="min-h-full flex flex-col">{children}</body> <body className="min-h-full flex flex-col">{children}</body>

View File

@@ -1,64 +1,104 @@
import Image from "next/image"; "use client";
import { ExternalLink, Pickaxe, Sprout, Wifi } from "lucide-react";
import { Badge } from "@/components/ui/badge";
import { buttonVariants } from "@/components/ui/button";
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { Separator } from "@/components/ui/separator";
import { cn } from "@/lib/utils";
const servers = [
{
name: "サバイバル鯖",
description: "採掘・冒険・建築を楽しむ通常ワールドです。",
address: "survival.mc.neody.ad.jp",
icon: Sprout,
badgeVariant: "default" as const,
},
{
name: "建築鯖",
description: "大型建築や街づくり向けのクリエイティブ環境です。",
address: "kenchiku.mc.neody.ad.jp",
icon: Pickaxe,
badgeVariant: "secondary" as const,
},
];
export default function Home() { export default function Home() {
return ( return (
<div className="flex flex-col flex-1 items-center justify-center bg-zinc-50 font-sans dark:bg-black"> <div className="relative flex min-h-full flex-1 flex-col overflow-x-clip bg-background">
<main className="flex flex-1 w-full max-w-3xl flex-col items-center justify-between py-32 px-16 bg-white dark:bg-black sm:items-start"> <div className="pointer-events-none absolute inset-x-0 top-0 -z-10 h-[380px] bg-gradient-to-b from-emerald-200/40 via-sky-200/25 to-transparent blur-3xl dark:from-emerald-500/20 dark:via-sky-500/20" />
<Image <main className="mx-auto flex w-full max-w-6xl flex-1 flex-col gap-10 px-4 py-10 sm:px-8 sm:py-14">
className="dark:invert" <section className="rounded-3xl border bg-card/70 p-6 shadow-sm backdrop-blur sm:p-10">
src="/next.svg" <Badge variant="outline" className="mb-4">
alt="Next.js logo" Takasumi-Neodyマイクラサーバプロジェクト接続ガイド
width={100} </Badge>
height={20} <h1 className="text-3xl font-semibold tracking-tight sm:text-5xl">
priority Minecraft
/>
<div className="flex flex-col items-center gap-6 text-center sm:items-start sm:text-left">
<h1 className="max-w-xs text-3xl font-semibold leading-10 tracking-tight text-black dark:text-zinc-50">
To get started, edit the page.tsx file.
</h1> </h1>
<p className="max-w-md text-lg leading-8 text-zinc-600 dark:text-zinc-400"> <p className="mt-4 max-w-3xl text-sm leading-7 text-muted-foreground sm:text-base">
Looking for a starting point or more instructions? Head over to{" "} Java Edition
<a
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="font-medium text-zinc-950 dark:text-zinc-50"
>
Templates
</a>{" "}
or the{" "}
<a
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="font-medium text-zinc-950 dark:text-zinc-50"
>
Learning
</a>{" "}
center.
</p> </p>
</section>
<section className="grid gap-4 md:grid-cols-2">
{servers.map((server) => {
const Icon = server.icon;
return (
<Card key={server.name} className="border-foreground/10">
<CardHeader>
<div className="mb-2 flex items-center justify-between gap-3">
<Badge variant={server.badgeVariant}>{server.name}</Badge>
<span className="inline-flex items-center gap-1.5 text-xs text-muted-foreground">
<Wifi className="size-3.5" />
Java /
</span>
</div> </div>
<div className="flex flex-col gap-4 text-base font-medium sm:flex-row"> <CardTitle className="flex items-center gap-2 text-xl">
<a <Icon className="size-5" />
className="flex h-12 w-full items-center justify-center gap-2 rounded-full bg-foreground px-5 text-background transition-colors hover:bg-[#383838] dark:hover:bg-[#ccc] md:w-[158px]" {server.name}
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" </CardTitle>
target="_blank" <CardDescription>{server.description}</CardDescription>
rel="noopener noreferrer" </CardHeader>
> <CardContent>
<Image <div className="rounded-xl border bg-background px-4 py-3">
className="dark:invert" <p className="text-xs text-muted-foreground"></p>
src="/vercel.svg" <p className="mt-1 break-all font-mono text-sm">{server.address}</p>
alt="Vercel logomark"
width={16}
height={16}
/>
Deploy Now
</a>
<a
className="flex h-12 w-full items-center justify-center rounded-full border border-solid border-black/[.08] px-5 transition-colors hover:border-transparent hover:bg-black/[.04] dark:border-white/[.145] dark:hover:bg-[#1a1a1a] md:w-[158px]"
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Documentation
</a>
</div> </div>
</CardContent>
<CardFooter className="gap-2">
<a
className={cn(buttonVariants(), "w-full sm:w-auto")}
href={`minecraft://?addExternalServer=${server.name}|${server.address}`}
>
Minecraft
<ExternalLink className="size-4" />
</a>
</CardFooter>
</Card>
);
})}
</section>
<section className="rounded-3xl border bg-card p-6 shadow-sm sm:p-8">
<h2 className="text-xl font-semibold"></h2>
<Separator className="my-4" />
<ol className="space-y-3 text-sm leading-7 sm:text-base">
<li>1. MinecraftJava Edition </li>
<li>2. Java: マルチプレイ / 統合版: サーバー</li>
<li>3. </li>
<li>4. </li>
</ol>
</section>
</main> </main>
</div> </div>
); );

52
components/ui/badge.tsx Normal file
View File

@@ -0,0 +1,52 @@
import { mergeProps } from "@base-ui/react/merge-props"
import { useRender } from "@base-ui/react/use-render"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"
const badgeVariants = cva(
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
secondary:
"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
destructive:
"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
outline:
"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
ghost:
"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
link: "text-primary underline-offset-4 hover:underline",
},
},
defaultVariants: {
variant: "default",
},
}
)
function Badge({
className,
variant = "default",
render,
...props
}: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>) {
return useRender({
defaultTagName: "span",
props: mergeProps<"span">(
{
className: cn(badgeVariants({ variant }), className),
},
props
),
render,
state: {
slot: "badge",
variant,
},
})
}
export { Badge, badgeVariants }

103
components/ui/card.tsx Normal file
View File

@@ -0,0 +1,103 @@
import * as React from "react"
import { cn } from "@/lib/utils"
function Card({
className,
size = "default",
...props
}: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {
return (
<div
data-slot="card"
data-size={size}
className={cn(
"group/card flex flex-col gap-6 overflow-hidden rounded-xl bg-card py-6 text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
className
)}
{...props}
/>
)
}
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-header"
className={cn(
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-6 group-data-[size=sm]/card:px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-6 group-data-[size=sm]/card:[.border-b]:pb-4",
className
)}
{...props}
/>
)
}
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-title"
className={cn(
"font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",
className
)}
{...props}
/>
)
}
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-description"
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
)
}
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-action"
className={cn(
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
className
)}
{...props}
/>
)
}
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-content"
className={cn("px-6 group-data-[size=sm]/card:px-4", className)}
{...props}
/>
)
}
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-footer"
className={cn(
"flex items-center rounded-b-xl px-6 group-data-[size=sm]/card:px-4 [.border-t]:pt-6 group-data-[size=sm]/card:[.border-t]:pt-4",
className
)}
{...props}
/>
)
}
export {
Card,
CardHeader,
CardFooter,
CardTitle,
CardAction,
CardDescription,
CardContent,
}

View File

@@ -0,0 +1,25 @@
"use client"
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator"
import { cn } from "@/lib/utils"
function Separator({
className,
orientation = "horizontal",
...props
}: SeparatorPrimitive.Props) {
return (
<SeparatorPrimitive
data-slot="separator"
orientation={orientation}
className={cn(
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
className
)}
{...props}
/>
)
}
export { Separator }