feat: enhance layout with navigation links and update announcements display
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
import { Badge } from "@/components/ui/badge";
|
import { Badge } from "@/components/ui/badge";
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
import { getAllAnnouncements } from "@/lib/announcements";
|
import { getAllAnnouncements } from "@/lib/announcements";
|
||||||
|
|
||||||
export const metadata = {
|
export const metadata = {
|
||||||
@@ -26,22 +25,20 @@ export default async function AnnouncementsPage() {
|
|||||||
|
|
||||||
<section className="grid gap-4">
|
<section className="grid gap-4">
|
||||||
{announcements.map((item) => (
|
{announcements.map((item) => (
|
||||||
<Card key={item.slug} className="border-foreground/10">
|
<article key={item.slug} className="rounded-2xl border border-foreground/10 bg-card p-5 shadow-xs sm:p-6">
|
||||||
<CardHeader>
|
<header>
|
||||||
<p className="text-xs text-muted-foreground">{item.date}</p>
|
<p className="text-xs text-muted-foreground">{item.date}</p>
|
||||||
<CardTitle className="text-xl">
|
<h2 className="mt-1 text-xl font-semibold">
|
||||||
<Link
|
<Link
|
||||||
href={`/announcements/${item.slug}`}
|
href={`/announcements/${item.slug}`}
|
||||||
className="underline-offset-4 hover:underline"
|
className="underline-offset-4 hover:underline"
|
||||||
>
|
>
|
||||||
{item.title}
|
{item.title}
|
||||||
</Link>
|
</Link>
|
||||||
</CardTitle>
|
</h2>
|
||||||
</CardHeader>
|
</header>
|
||||||
<CardContent>
|
<p className="mt-3 text-sm text-muted-foreground">{item.summary}</p>
|
||||||
<p className="text-sm text-muted-foreground">{item.summary}</p>
|
</article>
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
))}
|
))}
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import { Geist, Geist_Mono, Inter } from "next/font/google";
|
import { Geist, Geist_Mono, Inter } from "next/font/google";
|
||||||
|
import Link from "next/link";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
@@ -30,7 +31,24 @@ export default function RootLayout({
|
|||||||
lang="ja"
|
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">
|
||||||
|
<header className="sticky top-0 z-40 border-b bg-background/85 backdrop-blur">
|
||||||
|
<div className="mx-auto flex w-full max-w-6xl items-center justify-between px-4 py-3 sm:px-8">
|
||||||
|
<Link href="/" className="text-sm font-semibold tracking-tight sm:text-base">
|
||||||
|
Takasumi-Neodyマイクラサーバプロジェクト
|
||||||
|
</Link>
|
||||||
|
<nav className="flex items-center gap-4 text-sm">
|
||||||
|
<Link href="/" className="underline-offset-4 hover:underline">
|
||||||
|
メインページ
|
||||||
|
</Link>
|
||||||
|
<Link href="/announcements" className="underline-offset-4 hover:underline">
|
||||||
|
お知らせ
|
||||||
|
</Link>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
{children}
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user