mirror of
https://github.com/tuna2134/cecilia.git
synced 2026-07-26 07:01:34 +00:00
fixed
This commit is contained in:
@@ -1,5 +1,24 @@
|
||||
import { NextPage } from "next";
|
||||
import { NextPage, Metadata } from "next";
|
||||
import Image from "next/image";
|
||||
import { Activity, ActivityData } from "@/components/pages/Home";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "ホーム",
|
||||
description: "tuna2134のホームページ",
|
||||
};
|
||||
|
||||
const activities: ActivityData[] = [
|
||||
{
|
||||
title: "cecilia",
|
||||
description: "Next.jsで作成したポートフォリオサイトです。",
|
||||
url: "https://github.com/tuna2134/cecilia",
|
||||
},
|
||||
{
|
||||
title: "Neody Networks",
|
||||
description: "AS152873をはじめインフラをメインで運用しています。",
|
||||
url: "https://neody.ad.jp",
|
||||
},
|
||||
];
|
||||
|
||||
const Home: NextPage = () => {
|
||||
return (
|
||||
@@ -21,6 +40,11 @@ const Home: NextPage = () => {
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="text-xl font-bold mb-4">最近の活動</h3>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
{activities.map((activity, index) => (
|
||||
<Activity key={index} activity={activity} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -27,9 +27,7 @@ export default function RootLayout({
|
||||
lang="ja"
|
||||
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
|
||||
>
|
||||
<body className="min-h-full flex flex-col bg-black text-white">
|
||||
{children}
|
||||
</body>
|
||||
<body className="min-h-full flex flex-col">{children}</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ const Header: React.FC = () => {
|
||||
return (
|
||||
<header className="w-full flex flex-col items-center gap-1 py-4 border-b border-gray-400">
|
||||
<h1 className="text-4xl font-bold">tuna2134</h1>
|
||||
<small className="text-sm text-gray-400/90">
|
||||
<small className="text-sm text-gray-600/80">
|
||||
tuna2134の個人的な憩いの場
|
||||
</small>
|
||||
</header>
|
||||
|
||||
30
src/components/pages/Home.tsx
Normal file
30
src/components/pages/Home.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import Link from "next/link";
|
||||
|
||||
export interface ActivityData {
|
||||
title: string;
|
||||
description: string;
|
||||
url: string | null;
|
||||
}
|
||||
|
||||
interface ActivityProps {
|
||||
activity: ActivityData;
|
||||
}
|
||||
|
||||
export const Activity: React.FC<ActivityProps> = ({ activity }) => {
|
||||
return (
|
||||
<div className="p-4 border border-gray-300 rounded-lg mb-4 flex flex-col">
|
||||
<h4 className="text-lg font-semibold">{activity.title}</h4>
|
||||
<p className="flex-grow mb-2 text-gray-700">
|
||||
{activity.description}
|
||||
</p>
|
||||
{activity.url && (
|
||||
<Link
|
||||
href={activity.url}
|
||||
className="text-blue-500 hover:underline text-sm"
|
||||
>
|
||||
詳細
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user