mirror of
https://github.com/tuna2134/cecilia.git
synced 2026-02-06 14:42:40 +00:00
format
This commit is contained in:
@@ -1,24 +1,30 @@
|
||||
import Image from "next/image";
|
||||
|
||||
const Header: React.FC = async () => {
|
||||
const res = await fetch(
|
||||
"https://discord.com/api/v10/users/739702692393517076",
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bot ${process.env.DISCORD_TOKEN}`,
|
||||
}
|
||||
}
|
||||
);
|
||||
const data = await res.json();
|
||||
const avatarURL = `https://cdn.discordapp.com/avatars/739702692393517076/${data.avatar}.png?size=1024`
|
||||
return (
|
||||
<header className="h-screen w-screen flex justify-center items-center">
|
||||
<div>
|
||||
<Image alt="avatar" src={avatarURL} width={156} height={156} className="mb-2 rounded-full" />
|
||||
<h1 className="text-2xl font-bold text-center">tuna2134</h1>
|
||||
</div>
|
||||
</header>
|
||||
)
|
||||
}
|
||||
const res = await fetch(
|
||||
"https://discord.com/api/v10/users/739702692393517076",
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bot ${process.env.DISCORD_TOKEN}`,
|
||||
},
|
||||
},
|
||||
);
|
||||
const data = await res.json();
|
||||
const avatarURL = `https://cdn.discordapp.com/avatars/739702692393517076/${data.avatar}.png?size=1024`;
|
||||
return (
|
||||
<header className="h-screen w-screen flex justify-center items-center">
|
||||
<div>
|
||||
<Image
|
||||
alt="avatar"
|
||||
src={avatarURL}
|
||||
width={156}
|
||||
height={156}
|
||||
className="mb-2 rounded-full"
|
||||
/>
|
||||
<h1 className="text-2xl font-bold text-center">tuna2134</h1>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
};
|
||||
|
||||
export default Header;
|
||||
export default Header;
|
||||
|
||||
@@ -1,26 +1,28 @@
|
||||
export interface TimelineData {
|
||||
title: string;
|
||||
datetime: string;
|
||||
description: string;
|
||||
title: string;
|
||||
datetime: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
timeline: TimelineData[];
|
||||
timeline: TimelineData[];
|
||||
}
|
||||
|
||||
const Timeline: React.FC<Props> = ({ timeline }) => {
|
||||
return (
|
||||
<ol className="relative border-s border-gray-200">
|
||||
{timeline.map((data, index) => (
|
||||
<li className="mb-10 ms-6" key={index}>
|
||||
<div className="absolute w-3 h-3 bg-[#00F3A4] rounded-full mt-1.5 -start-1.5 border border-white"></div>
|
||||
<p className="text-gray-900/75 mb-1">{data.datetime}</p>
|
||||
<h1 className="text-2xl font-bold mb-2 tracking-wider">{data.title}</h1>
|
||||
<p>{data.description}</p>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<ol className="relative border-s border-gray-200">
|
||||
{timeline.map((data, index) => (
|
||||
<li className="mb-10 ms-6" key={index}>
|
||||
<div className="absolute w-3 h-3 bg-[#00F3A4] rounded-full mt-1.5 -start-1.5 border border-white"></div>
|
||||
<p className="text-gray-900/75 mb-1">{data.datetime}</p>
|
||||
<h1 className="text-2xl font-bold mb-2 tracking-wider">
|
||||
{data.title}
|
||||
</h1>
|
||||
<p>{data.description}</p>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
);
|
||||
};
|
||||
|
||||
export default Timeline;
|
||||
export default Timeline;
|
||||
|
||||
Reference in New Issue
Block a user